How to show related products in "Add to cart" Ajax

Phoca Cart - complex e-commerce extension
TomasZmuda
Phoca Member
Phoca Member
Posts: 14
Joined: 28 Dec 2019, 22:41

How to show related products in "Add to cart" Ajax

Post by TomasZmuda »

Hi,
I'd like to ask, if is it possible to show related products in Ajax window after product has been added to the cart. Or any other other possibility to make this related products more visible for customer?

Thank you!

Tomas from Czech Rep.

Tags:
TomasZmuda
Phoca Member
Phoca Member
Posts: 14
Joined: 28 Dec 2019, 22:41

Re: How to show related products in "Add to cart" Ajax

Post by TomasZmuda »

Finally, I solved it hardcoded. It would be great to add this feature to next release. ;-)

End of layouts/popup_add_to_cart.php:

<script type="text/javascript">
$("#phrelated").clone()
.attr({"class":"clone tab-pane fade ph-tab-pane active in"})
.insertAfter(".modal-footer");

$('.clone').prepend('<h4>Related products</h4>');
</script>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to show related products in "Add to cart" Ajax

Post by Jan »

Hi, thank you for your ideas. In Popup, there is an event listening to plugins. So for this purpose, the plugin should be done.

Like there is one existing for free shippping info:

Image

Added to the feature request list.

Jan
If you find Phoca extensions useful, please support the project
Post Reply