Solved

How do I use product blocks with relative urls?

  • 11 January 2022
  • 3 replies
  • 104 views

Userlevel 1
Badge +4

I manage several accounts as part of an agency and have noticed that the product blocks have difficulty in pulling the images from our website via the WooCommerce plugin. Klaviyo Support have advised using absolute urls.

Relative urls are the default for WordPress websites. We are not sure if changing to default urls will affect our websites in other ways, so we are testing with one website for now.

I know with the flows, there’s an easy fix for missing images because of relative urls. That’s putting {{ organisation url }} before the code. So my question is - as well as how do I use product blocks with relative urls - can I edit the product blocks in a similar way? And if so, how do I do this?

icon

Best answer by alex.hong 13 January 2022, 19:40

View original

3 replies

Userlevel 7
Badge +58

Hi there @lex_zap,

Welcome to the Community! Thank you for posting your WooCommerce related question here and hope I can provide some info.

After speaking to some of my colleagues on the Success Engineering department, they have noted that there should not be any issues regarding a switch from relative to absolute urls. I would also advise that for questions such as 

We are not sure if changing to default urls will affect our websites in other ways, so we are testing with one website for now.

WooCommerce Support and reaching out to their team would yield more information and better guidance as to how it affects your sites. 

I would suppose one work around may be to use a custom catalog that you set up that is built separate from your website. However, that would be up to you as well and I'm unsure how that would play out with your overall goals. Alternatively, if you want to stick with relative URLs, then you could custom code the product block and/or leverage our catalog lookup tag as opposed to the block.

Let me know your thoughts and I will update here once I hear more info from our SE team.

Alex

Userlevel 1
Badge +4

Hi there @lex_zap,

Welcome to the Community! Thank you for posting your WooCommerce related question here and hope I can provide some info.

After speaking to some of my colleagues on the Success Engineering department, they have noted that there should not be any issues regarding a switch from relative to absolute urls. I would also advise that for questions such as 

We are not sure if changing to default urls will affect our websites in other ways, so we are testing with one website for now.

WooCommerce Support and reaching out to their team would yield more information and better guidance as to how it affects your sites. 

I would suppose one work around may be to use a custom catalog that you set up that is built separate from your website. However, that would be up to you as well and I'm unsure how that would play out with your overall goals. Alternatively, if you want to stick with relative URLs, then you could custom code the product block and/or leverage our catalog lookup tag as opposed to the block.

Let me know your thoughts and I will update here once I hear more info from our SE team.

Alex

Hi Alex,

Thank you for getting back to me. Is there any guidance available on how to change the code of product blocks / custom code them?
 

Kind regards,
Lex

Userlevel 7
Badge +58

Hi there Lex @lex_zap,

No problem! I would take a look within this community thread for info you might find helpful:

If there’s custom coding assistance within WooCommerce I would again contact them and see what they have to say on this matter as well just to get more info for yourself.

Have a good day!
Alex

Reply