Jump to content

Change add to cart button behavior if no combination selected with alert message


Recommended Posts

Hi everyone !

 

Ok I'll try out to be clear as possible :

 

I'm trying to change the product page add to cart button behavior working with combinations.

 

I have a product with 4 sizes. What I would like is that no default combination is selected, and when the customer clicks on the add to cart button display an alert " please first select a combination"..

 

Actually I deleted in product.tpl :

{if ($group.default == $id_attribute)} checked="checked"{/if}

That gives to have no default combination selected.

 

But the add to cart button doesn't display anymore !

 

I found that this is managed in product.js, but can't find how to figure this out ^^

 

If somebody has a trick I would be gratefull ;-)

 

Thanks in advance.

Best regards.

Link to comment
Share on other sites

  • 3 years later...

Finally after many days of investigation with no luck I have found the problem. Share a like if it help you.  :)

This succed only with the products that have the combinations active. If succed for all products you have then is "Catalog Mode" activate. In this case turn it off.

If instead it succed only for some product if you see are all products with combinations that you have created. Just set the "Date of availability" of the product and check the right quantity inside each combination created.  :)

 

That's all!  :)

Link to comment
Share on other sites

Create an account or sign in to comment

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

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...