Configuring 'add to Cart' Button on homepage featured collection - Theme Prestige

Hi everybody,

I am seeking help with my Prestige shop theme. I would like to configure an ‘add to Cart’ Button on the homepage featured collection - I have searched around a bit and apparently

one would have to edit the HTML code of the liquid.cart file. But that is all the in fo I got.

I looked into the code but could find where this is addressed.

Anyone can offer some help?

My store is

www.XRISIS.af

Thanks

Hey you need to enable Add to cart functionality on homepage -

To do so you need to have the following things -

Fetch real Products on homepage using a collection not just with URL. Once you have the products go to your product page and search for with class name ‘ProductForm’ so copy that form integrate into the products which you’re showing on homepage.

Thank you for your suggestion. Could you maybe go more into detail? Where would you suggest putting in the copied code?

Cheers

Regina

Hi - You need to first fetch the collections on homepage using this code


   
    {% for product in collections['homepage-collections'].products %}
    

        

            {% comment %} Fetch Product Images{% endcomment %}
            {% for image in product.images %}
            
            {% endfor %}
        

        {% comment %} Fetch Product title & Price {% endcomment %}
        ## {{ product.title }} 
        

 {{ product.price }}

        {% comment %} Add to Cart Button {% endcomment %}
         
    

    {% endfor %}

Like here i did that. you want to do the same thing ?

@Arslan_Mumtaz please I need to do the same on prestige theme, how did you manage it ?
Thanks for your help

1 Like

{% comment %} Add to Cart Button {% endcomment %}

Add to cart

Add the following code in product-item.liquid

Hi

Would I add the same code to get this onto the debut theme as well?

Thank you

Actually I would like to add a “Buy Now” button to the Debut theme on my home page featured collection.