News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

SOLVED: Dynamic update of a cart module doesn't work after update to VM 2.6.2

Started by borro, May 19, 2014, 10:28:02 AM

Previous topic - Next topic

borro

Hello!

Thank you for VM!

I made upgrade to VirtueMart 2.6.1. Now quantity and cost of a products in a cart(at the top right corner) can not be updated dynamicly without page reload if you click Add-to-cart button(green button).
Could somebody take a look at site?

I've noticed that after click on add-to-cart button such mistake arises:
QuoteGET http://www.antiloppagold.ru/index.php?option=com_virtuemart&nosef=1&view=cart&task=viewJS&format=json&lang=ru&_=1400490778377 500 (Internal Server Error)
What does it mean?
Is there script versions conflict?
Wish you happiness!

borro

It seems like there is some bug with JSON processing
I have the same problem in VM 2.6.2
Wish you happiness!

dimi2013


Milbo

Borro, I think you are using a too recent jquery version. We had the same trouble writing for j3.

Use in FE/assets/js/vmprices.js at around line 14 this

jQuery.getJSON(window.vmSiteurl + 'index.php?option=com_virtuemart&nosef=1&view=productdetails&task=recalculate&virtuemart_product_id='+id+'&format=json' + window.vmLang, datas,
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

borro

Quote from: Milbo on May 22, 2014, 16:26:36 PM
Borro, I think you are using a too recent jquery version. We had the same trouble writing for j3.
I'm using jquery 1.7.2. it's not a recent version I think.
Quote from: Milbo on May 22, 2014, 16:26:36 PM
Use in FE/assets/js/vmprices.js at around line 14 this

jQuery.getJSON(window.vmSiteurl + 'index.php?option=com_virtuemart&nosef=1&view=productdetails&task=recalculate&virtuemart_product_id='+id+'&format=json' + window.vmLang, datas,

I cann't understand what you suggest in a row above. Do i need to find the reason of mistake in this row?
I think something has changed in VM, because the link like
Quotesite.com/index.php?option=com_virtuemart&nosef=1&view=cart&task=viewJS&format=json&lang=ru&_=1400592190950
works fine and returns such answer in VM2.0.18a:
Quote
{"products":[{"product_name":"\u041c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0432\u0435\u0442\u0441\u043a\u043e\u0439 122-\u043c\u043c \u0433\u0430\u0443\u0431\u0438\u0446\u044b \u041c-30<\/a>","product_sku":"93508","pricesUnformatted":10000,"prices":"10000,00 \u0440\u0443\u0431","subtotal":10000,"subtotal_tax_amount":0,"subtotal_discount":0,"subtotal_with_tax":10000,"quantity":5},{"product_name":"\u041c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0442\u043e\u0446\u0438\u043a\u043b\u0430 \u041c-72 \u0441 \u044d\u043a\u0438\u043f\u0430\u0436\u0435\u043c \u0438 82-\u043c\u043c \u043c\u0438\u043d\u043e\u043c\u0435\u0442\u043e\u043c<\/a>","product_sku":"93815","pricesUnformatted":7000,"prices":"7000,00 \u0440\u0443\u0431","subtotal":7000,"subtotal_tax_amount":0,"subtotal_discount":0,"subtotal_with_tax":7000,"quantity":2},{"product_name":"\u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u043c\u0435\u0446\u043a\u043e\u0433\u043e \u0442\u044f\u0436\u0435\u043b\u043e\u0433\u043e \u043c\u043e\u0442\u043e\u0446\u0438\u043a\u043b\u0430 \u0420-12 \u0441 \u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043c \u0438 \u043e\u0444\u0438\u0446\u0435\u0440\u043e\u043c<\/a>","product_sku":"93816","pricesUnformatted":2500,"prices":"2500,00 \u0440\u0443\u0431","subtotal":2500,"subtotal_tax_amount":0,"subtotal_discount":0,"subtotal_with_tax":2500,"quantity":1},{"product_name":"\u041c\u043e\u0434\u0435\u043b\u044c \u0417\u0420\u041a \u0421\u0442\u0438\u043d\u0433\u0435\u0440 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044f \u0425\u0430\u043c\u043c\u0435\u0440<\/a>","product_sku":"93577","pricesUnformatted":30000,"prices":"30000,00 \u0440\u0443\u0431","subtotal":30000,"subtotal_tax_amount":0,"subtotal_discount":0,"subtotal_with_tax":30000,"quantity":3}],"totalProduct":11,"billTotal":"- 49500,00 \u0440\u0443\u0431","dataValidated":false,"totalProductTxt":"11 \u0442\u043e\u0432\u0430\u0440\u043e\u0432","cart_show":"\u041a\u043e\u0440\u0437\u0438\u043d\u0430: <\/a>"}
but the same link doesn't return anything in VM 2.6.2. So where should I begin my investigations? By which url does VM 2.6.2 return the same answer? Please help.

SOLVED! Here is the answer
Wish you happiness!