| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Add2CartPopoup module help | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Add2CartPopoup module help
Hi,
I want to open Add2CartPopoup module directly width out adding the product to the cart (the popup that opens when you click "add to cart" button). So far, i managed to create a button that opens it open it, but it always opens the last product that was added to the cart. Below is the JS that handles this, and it is in an event listener. I passed productID and that is the id of the product, but I have not succeeded in getting it to open correctly. Any ideas? Code:
__________________
X-Cart 5 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Add2CartPopoup module help
Hello @Kackavaljer,
As far as I understand, you want to show Add2Cart popup without product, right? If so, you need to write a new widget, because current implementation of Add2Cart popup assumes a product that will be displayed in top left area. Please, let me know if it helps. Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#3
|
|||||||
|
|||||||
Re: Add2CartPopoup module help
No, I need to open the Add2Cart popup with the product, but width out adding the product to the cart.
__________________
X-Cart 5 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Add2CartPopoup module help
What product you want to display in this popup?
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#5
|
|||||||
|
|||||||
Re: Add2CartPopoup module help
The one i clicked on.
__________________
X-Cart 5 |
|||||||
#6
|
|||||||
|
|||||||
Re: Add2CartPopoup module help
It should display the Add2Cart popup instead of the standard QuickLook popup but not to add the product to the cart. I will add a custom Add to cart button to that new popup.
__________________
X-Cart 5 |
|||||||
#7
|
|||||||||
|
|||||||||
Re: Add2CartPopoup module help
Hello @Kackavaljer,
Here is how you can try to achieve it. 1) You need to decorate JS' ProductsListView.prototype.postprocess method described in the <X-Cart>/skins/default/en/items_list/product/products_list.js file, so it would work with add2_cart_popup target instead of quick_look. Example of decorating JS scripts is in the <X-Cart>/skins/default/en/modules/XC/ProductComparison/compare/products/script.js file that decorates the same method. 2) Then, we need to apply changes to \XLite\Module\XC\Add2CartPopup\View\Add2Cart widget. The condition PHP Code:
PHP Code:
and the getProduct() method should be defined as follows: PHP Code:
Please, let me know if it helps. Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
|||
X-Cart forums © 2001-2020
|