All the products which has to have this function is attribute products which have to be bought from the product page.
You are clear over that it’s only some products, not all. I know we can set a popup to appear when you enter a product. Will this customization be connected to this feature in your PopUp pro module?
how to show custom popup with pressing 'add to cart' button ?
Hello
So, if it will be related only to products that have combinations it will be necessary to add this kind of script at the end of product.js file (themes/your-theme/js/product.js)
$(document).ready(function() { var id_of_popup_to_show = 1; if (attributesCombinations.length>0) { $('#add_to_cart').click(function() { var postoptions = "getparams=" + id_of_popup_to_show; $.post(baseDir + "modules/popuppro/ajax_popuppro.php", postoptions, function (data) { eval(data); }); }); } });just replace value of id_of_popup_to_show with ID of popup you want to display, id of popu you can get here:
Result of script:
poup that will be spawned only for products that have combinations. on screencast i show script workflow for product with and without combinations (to show differencies)
https://drive.google.com/uc?id=0B7fGO53dEJzbNUh6dDJoejNYNHM
I provided it for free as a part of module support,
so if your customer already have this module - it will be enough to use the script i shared above.
best regards,
Milos
0 comments:
Post a Comment