I would like to display "Product already in cart"message next to "add to cart" button if product is already in cart.
I know that I have to edit product.php and pass the variable to product.tpl
I just have no idea how to check cart content from product.php file.
I was wondering if anybody can help me out.
I hope I make sense.
Here you go. vQmod attached
When visiting the product page, if the item is already in the cart, it will show a popup saying that it is already in the cart
When visiting the product page, if the item is already in the cart, it will show a popup saying that it is already in the cart
Attachments
Works for 1.5.x and 2.x
Can this be used in Opencart 2.0.1 ??
I need this also as i would be selling unique products, and sometimes people don't realize they have added the product already and error would occur when checking out.
I need this also as i would be selling unique products, and sometimes people don't realize they have added the product already and error would occur when checking out.
Qphoria wrote:I've updated code to work on 1.5.x and 2.x and created as vQmodarqueologomusical wrote:Can this be used in Opencart 2.0.1 ??
I need this also as i would be selling unique products, and sometimes people don't realize they have added the product already and error would occur when checking out.
I downloaded and uploaded the code to my xml folder. do i need to do something else? tried it but dosn't work.
just wondering, in your xml file, the theme its marked as
theme/*/template
do i need to edit that or that is for the currenty theme set?
thank you in advance
I just re-checked, and it partially works but not as desired.Qphoria wrote:No need to edit. It uses wildcards. Any errors in the vqmod/logs folder?
If i enter directly to the product page, and ALERT will say "Product already in cart" if i had in the cart already, but i can still click on the button to add to cart and it keeps adding more.
Also, if i click on the "add to cart" button , whether if its from the catalog view, latest, specials, manufacturers,.. all the pages where the product shows up i can "add to cart" as many times as i want, and keeps going on.
Any ideas how could i
- have this checked from every page where the product displays (catalog, latest, specials, by manufacturer, related)-
- avoid "adding the product" to cart, once its in cart, perhaps "disabling" the button ?
Hi,
First off Qphoria thanks for the vqmod system!
I would like to change the "add to cart" button to "in cart" for each individual product on the catagory page.
I've tried editing the supplied vqmod, but when i refresh the category page it's showing "in cart" for all products when a single product is in cart, while the catalog/view/theme/*/template/product/category.tpl has a foreach ($products as $product) and it should validate each cart item per product in the catalog.
Is the code in the catalog/controller/product/category.php causing this problem?
I was wondering if anybody can provide advice or a working edited vqmod, how to implement this for the category view.
Thanks in advance!
First off Qphoria thanks for the vqmod system!
I would like to change the "add to cart" button to "in cart" for each individual product on the catagory page.
I've tried editing the supplied vqmod, but when i refresh the category page it's showing "in cart" for all products when a single product is in cart, while the catalog/view/theme/*/template/product/category.tpl has a foreach ($products as $product) and it should validate each cart item per product in the catalog.
Is the code in the catalog/controller/product/category.php causing this problem?
I was wondering if anybody can provide advice or a working edited vqmod, how to implement this for the category view.
Thanks in advance!
I've finally figured how to acquire my goal.
VQmod attached.
Who is online
Users browsing this forum: No registered users and 5 guests