Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Dynamic section rendring API is returning 404

Dynamic section rendring API is returning 404

FaizaBashir
Shopify Partner
39 0 3

Hi,

 I have a section on product page that showsf products from main products's variants  metafields. i-e when main product variant changes the products in that section should chnage pased on variant selected. I am using section rendering api to chnage the section products based on variant selected. But it is giving me 404 error. Here is my code

fetch('/products/'+this.productHandle+'?section_id=shopify-section-template--17825889157344__wear_it_with_ntyGjJ&variant_id='+this.currentVariant.id)
.then((response) => {
$("#shopify-section-template--17825889157344__wear_it_with_ntyGjJ").replaceWith(response);
})
.then(data => {
console.log(data);
});

Any help would be appreciated

Thanks

Replies 0 (0)