Jump to content

Can't run multiple code blocks on one page

Recommended Posts

Posted

Hello,

For some reason I cannot run multiple code blocks on a page with properly working code ( I assume).

I've tried defining and closing each code block with code with doctype html- but still no luck.

Any ideas on how to fix?

 

  • Replies 3
  • Views 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

  • 10 months later...
Posted

Hi,

I have the same problem and don't know how to fix. Im new, please help.

So, Im trying to build my first website to resell products. I have the store and the products in Ecwid and the store is put on Squarespace page to fetch the products from Ecwid.

In the front-page Im trying to introduce all categories so, that there is first a section for some images & text and then a code block to pull one product from Ecwid store to show related categorie. When I create this kind of introduction for multiple categories, only the first code-block works and the rest of them stay blank.

Is there a way to fix or go around this?

Thanks for help!

Page: www.laavucrafting.com

Code to embed a product (created in Ecwid):

<div id="my-store-97757539"></div>
<div><script data-cfasync="false" type="text/javascript" src="https://app.ecwid.com/script.js?97757539&data_platform=code&data_date=2024-02-10" charset="utf-8"></script>
<script type="text/javascript"> 
window.ec=window.ec||{}; 
window.ec.storefront=window.ec.storefront||{}; 
window.ec.storefront.enable_navigation=true;
window.ec.storefront.product_details_layout="TWO_COLUMNS_SIDEBAR_ON_THE_LEFT";
window.ec.storefront.product_details_gallery_layout="IMAGE_SINGLE_THUMBNAILS_VERTICAL";
window.ec.storefront.product_details_two_columns_with_right_sidebar_show_product_description_on_sidebar=false;
window.ec.storefront.product_details_two_columns_with_left_sidebar_show_product_description_on_sidebar=true;
window.ec.storefront.product_details_show_product_name=true;
window.ec.storefront.product_details_show_breadcrumbs=false;
window.ec.storefront.product_details_show_product_sku=false;
window.ec.storefront.product_details_show_product_price=true;
window.ec.storefront.product_details_show_in_stock_label=false;
window.ec.storefront.product_details_show_number_of_items_in_stock=false;
window.ec.storefront.product_details_show_qty=false;
window.ec.storefront.product_details_show_wholesale_prices=false;
window.ec.storefront.product_details_show_product_options=true;
window.ec.storefront.product_details_show_product_description=true;
window.ec.storefront.product_details_show_delivery_time=undefined;
window.ec.storefront.product_details_show_share_buttons=false;
window.ec.storefront.product_details_position_product_name=100;
window.ec.storefront.product_details_position_breadcrumbs=200;
window.ec.storefront.product_details_position_product_sku=300;
window.ec.storefront.product_details_position_product_price=400;
window.ec.storefront.product_details_position_product_options=undefined;
window.ec.storefront.product_details_position_buy_button=600;
window.ec.storefront.product_details_position_wholesale_prices=700;
window.ec.storefront.product_details_position_product_description=900;
window.ec.storefront.product_details_position_delivery_time=undefined;
window.ec.storefront.product_details_position_share_buttons=800;
window.ec.storefront.product_details_position_subtitle=500;
window.ec.storefront.product_details_show_subtitle=false;
xProductBrowser("categoriesPerRow=3","views=grid(20,3) list(60) table(60)","categoryView=grid","searchView=list","defaultProductId=626075182","id=my-store-97757539");
</script>
</div>

Posted
On 2/10/2024 at 11:52 PM, lak93598 said:

Hi,

I have the same problem and don't know how to fix. Im new, please help.

So, Im trying to build my first website to resell products. I have the store and the products in Ecwid and the store is put on Squarespace page to fetch the products from Ecwid.

In the front-page Im trying to introduce all categories so, that there is first a section for some images & text and then a code block to pull one product from Ecwid store to show related categorie. When I create this kind of introduction for multiple categories, only the first code-block works and the rest of them stay blank.

Is there a way to fix or go around this?

Thanks for help!

Page: www.laavucrafting.com

Code to embed a product (created in Ecwid):

<div id="my-store-97757539"></div>
<div><script data-cfasync="false" type="text/javascript" src="https://app.ecwid.com/script.js?97757539&data_platform=code&data_date=2024-02-10" charset="utf-8"></script>
<script type="text/javascript"> 
window.ec=window.ec||{}; 
window.ec.storefront=window.ec.storefront||{}; 
window.ec.storefront.enable_navigation=true;
window.ec.storefront.product_details_layout="TWO_COLUMNS_SIDEBAR_ON_THE_LEFT";
window.ec.storefront.product_details_gallery_layout="IMAGE_SINGLE_THUMBNAILS_VERTICAL";
window.ec.storefront.product_details_two_columns_with_right_sidebar_show_product_description_on_sidebar=false;
window.ec.storefront.product_details_two_columns_with_left_sidebar_show_product_description_on_sidebar=true;
window.ec.storefront.product_details_show_product_name=true;
window.ec.storefront.product_details_show_breadcrumbs=false;
window.ec.storefront.product_details_show_product_sku=false;
window.ec.storefront.product_details_show_product_price=true;
window.ec.storefront.product_details_show_in_stock_label=false;
window.ec.storefront.product_details_show_number_of_items_in_stock=false;
window.ec.storefront.product_details_show_qty=false;
window.ec.storefront.product_details_show_wholesale_prices=false;
window.ec.storefront.product_details_show_product_options=true;
window.ec.storefront.product_details_show_product_description=true;
window.ec.storefront.product_details_show_delivery_time=undefined;
window.ec.storefront.product_details_show_share_buttons=false;
window.ec.storefront.product_details_position_product_name=100;
window.ec.storefront.product_details_position_breadcrumbs=200;
window.ec.storefront.product_details_position_product_sku=300;
window.ec.storefront.product_details_position_product_price=400;
window.ec.storefront.product_details_position_product_options=undefined;
window.ec.storefront.product_details_position_buy_button=600;
window.ec.storefront.product_details_position_wholesale_prices=700;
window.ec.storefront.product_details_position_product_description=900;
window.ec.storefront.product_details_position_delivery_time=undefined;
window.ec.storefront.product_details_position_share_buttons=800;
window.ec.storefront.product_details_position_subtitle=500;
window.ec.storefront.product_details_show_subtitle=false;
xProductBrowser("categoriesPerRow=3","views=grid(20,3) list(60) table(60)","categoryView=grid","searchView=list","defaultProductId=626075182","id=my-store-97757539");
</script>
</div>

Can you send 3 or 4 Code Block code?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.