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

Cart does not update when selecting shipment method

Started by vittoriobruno, February 02, 2016, 13:46:08 PM

Previous topic - Next topic

vittoriobruno

Hello,
I am using Joomla 3.4.8 + Virtuemart 3.0.12 and I have an issue in the cart. Currently, my cart module is integrated in a menu.
The issue is related to the update of the cart. When I add any product in the cart, popup appears and cart updates its total and number of products. Here, it's okay, it seems AJAX is working fine. Once logged in, when I click on "show cart", I have to select the shipment method (OPC is enabled): I have to select between 3 choices. Each one has a cost. But when I select one shipment method, cart total does not update. I cannot see any update even if I select any other shipment method. It updates only if I refresh the page. This is not good since user sees a price in the cart module and another in the end of cart summary. I wonder why the update is not occurring just when selecting shipment method. Could anyone help me?
I attach some backend settings, hoping they can be useful.

Thanks!
Vittorio

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

vittoriobruno

Hi, sorry for the missing informations.
Url is shop.magazzinilasorgente.it
Template was created with component "template creator" and menu where cart is present was customized with component Maximenu Params.
The only override I made on cart module is on file ..../mod_virtuemart_cart/default.php.  Here I slightly changed the layout of the text in the cart. Since I integrated it in an horizontal menu, width requirements became relevant: so I modified module in order to show number of products in the first row, total of cart in the second row (removing the right floating of "total" div), and finally "show cart" link in the third row. Then, I just forced width:auto for the cart module.
I created some other overrides, about order details and cart summary... but I don't think they are part of the discussion.
About OPC plugin I do not know exactly what to tell... I mean, I have never managed it and I have never installed anything related, so I think I am using the default plugin provided by Virtuemart. I do not know whether template creator rather than maximenu params components have impact on this plugin.

Thanks

GJC Web Design

1. switch back to Protostar template and see if the problem still exists

2. if you have ajax enabled chk u have no JS errors on the cart page

3. chk console for ajax sends and responses
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

vittoriobruno

Hello,
I have tried to set both protostar and beez templates: issue is still present. I tried also to add a cart module in the left side of the page, just to understand if its integration in a menu could create troubles... but there is no difference.
Then, I tried to use firebug in my firefox browser in order to check for js errors and also to use the console manager of the browser: they do not report any errors.
The 2 procedures just informed me about:
- using "getAttribute()" instead of "getAttributeNode()", that is deprecated;
- unreachable code after return statement
I am attaching relative images.
I do not know if this satisfies what you asked me to do but, since I am not pro in this stuff, I do not know exactly which steps I have to do.

Thanks

GJC Web Design

It is never good to have any errors in JS as the run stops at that point --

I don't know what this is refering to?->  unreachable code after return statement

what sort of ship plugins are these?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

vittoriobruno

I do not know what it refers to as well... but I can say I have never modified any JS code.
Ship plugins are the default ones: I mean, I have not installed any 3rd party plugin for shipments. The 3 methods I have set are the standard "VM Shipment - by weight, ZIP and countries" ones. I have set only the country (Italy) for all of them, no other requirements like weight, number of products...
So, I do not know how to solve..

Milbo

#7
Maybe a plugin? For xample a jquery plugin, check your "system" plugins
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

vittoriobruno

Hello,
I did not solve the issue searching into the several plugins..
So I tried another way: I just performed a clean installation of Joomla 3.4.8 and Virtuemart 3.0.12 in my localhost site. Then, I set beez as default site template, and I have just created 2 products and 2 shipment methods (no constraints of weight, total cart, etc: just 2 different costs for shipment, it's just a test). Well... the issue is still here!! So I could start to think it's a "root" problem, not a matter of third party extension.

I attach 3 images to let you have a better idea: in step 1, product has just been added in the cart. No shipment method is selected. In step 2 I chose the first shipment method: as you can see, total cart updates but the total in CART MODULE doesn't! Same in step 3: I changed shipment method and total in cart module remains still just the item cost.
Does anyone of you have a base Joomla 3.4.8 and VM 3.0.12 installation, just to try and check the same behaviour?

Thanks
Vittorio

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

vittoriobruno

Hi,
3.0.12.2 is new for me! I tried with the version of VM downloadable in http://virtuemart.net/downloads
And in my backend I see just "Virtuemart 3.0.12"

Milbo

I just tried and yes the module does not update, when the cart updates.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

AH

IMHO - if  it does update then that creates more confusion

When/If the Cart total showing includes the shipping/payment charges there is no separate line element for these additional charges

In your example:

Product item 10.00
Product total = 10.00

If the cart total updates it would show:
Product item 10.00
Product total = 20.00

There is no separate line for the shipping fee

I think that looks even more confusing??
Regards
A

Joomla 4.4.5
php 8.1

Milbo

I agree, we just should ensure that cart module developers could use a trigger, as far as I know there is a js trigger.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jenkinhill

I don't see the logic in having the cart module display at checkout and display the same data twice.  I always have as few modules at checkpout as possible. 
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum