VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: dorkus on November 25, 2012, 16:17:43 PM

Title: [ SOLVED ] mod_cart does not update properly VM2.0.12b
Post by: dorkus on November 25, 2012, 16:17:43 PM
since the update from vm 2.0.8 to vm 2.0.12b the module cart does not update properly.

when i put an article in the cart the pop-up appears that the article has been put into the cart. the module show that there is 1 article for XX EUR in the basket. when i click on "continue shopping" in the popup the site loads the category page and all of a sudden the cart module shows that there are no articles in the cart. but for some reason when i go to the cart article is still in the basket and the module shows the correct amount. what could have caused this? i need a fix.

(https://dl.dropbox.com/u/25785459/Bildschirmfoto%202012-11-25%20um%2016.15.35.png)

(https://dl.dropbox.com/u/25785459/Bildschirmfoto%202012-11-25%20um%2016.16.05.png)

any ideas? i am desperate!

thank you so much!
Title: Re: mod_cart does not update properly VM2.0.12b
Post by: bytelord on November 25, 2012, 19:02:10 PM
Hello,

Any live url to test it?
Did you also update your template overrides with the new changes? Do you use any commercial /third party vm template?
http://virtuemart.net/index.php?option=com_content&id=416

Regards
Title: Re: mod_cart does not update properly VM2.0.12b
Post by: naescent on November 26, 2012, 16:54:36 PM
Hi,

I'm having the same problems using Virtuemart 2.0.14 and Joomla 2.5.8 and recently updated. I have two overrides that I will switch off for the time being which are com_virtuemart=>cart=>default_pricelist.php and com_virtuemart=>category=>default.php

My problem is almost identical. Add an item to the cart click continue shopping and the cart MODULE does not update. Go to the shopping cart alter the quantities and the cart does not update. Any kind of normal or forced refresh does not alter it. I have found though that if I go to Joomla Admin->Site->Maintenance->Clear Cache and select "com_modules" only and clear it and then do a light refresh of the page that the cart then updates.

The url is http://vps7887.inmotionhosting.com/~androsia/

That was using firefox, using chrome I get the ajax pop up asking to continue or go to cart. In the background you can see the shopping cart get updated to 1 product. Click continue shopping, I go back a page and the shopping cart is now empty.

If I then click another item add that to the cart, the pop up comes up asking to continue or go to cart and in the background I can see the shopping cart get updated to 2 products. I click continue shopping I go back a page and then the shopping cart module shows empty again.

At no point did I ever had a problem with the main shopping cart itself, this always showed an accurate representation of what I'd requested to buy.

Hope this helps,
Adam
Title: Re: mod_cart does not update properly VM2.0.12b
Post by: bytelord on November 26, 2012, 17:03:09 PM
Hello,

Yes, it is not update, but you are using a custom cart module and also overrides, di you check them? From browse view is working but not in cart page as you said. I test it also. Do you also use cache on your site? Have you exclude the module from caching or the whole cart page?

Regards
Title: Re: mod_cart does not update properly VM2.0.12b
Post by: naescent on November 26, 2012, 18:39:47 PM
I have all my custom overrides disabled. I have removed them so I am not using a custom cart module. I am using the Virtuemart Shopping Cart Module as standard.

I have not removed it from the cache, but this only solves the symptom not the problem.

Adam
Title: Re: mod_cart does not update properly VM2.0.12b
Post by: bytelord on November 26, 2012, 18:54:26 PM
Hi,

First you are still using overrides, just test your site again. Also you are caching the cart module ... caching in joomla is produced each time you render a page. You may not cache the cart page BUT you cache the module cart!! ok?

Regards
Title: Re: mod_cart does not update properly VM2.0.12b
Post by: dorkus on November 29, 2012, 14:28:52 PM
my problem also still remains.

i disabled the folder /template/name/html/com_virtuemart

my overrides were:
/cart
/category
/invoice
/productdetails
/user

but no /mod_virtuemart_cart overrides

the code of the cart mod is as follows:

<?php // no direct access
defined('_JEXEC') or die('Restricted access');

//dump ($cart,'mod cart');
// Ajax is displayed in vm_cart_products
// ALL THE DISPLAY IS Done by Ajax using "hiddencontainer" 
?>


<!-- Virtuemart 2 Ajax Card -->
<div class="vmCartModule <?php echo $params->get('moduleclass_sfx'); ?>" id="vmCartModule">
<?php
if ($show_product_list) {
?>

<div id="hiddencontainer" style=" display: none; ">
<div class="container">
<?php if ($show_price) { ?>
  <div class="prices" style="float: right;"></div>
<?php ?>
<div class="product_row">
<span class="quantity"></span>&nbsp;x&nbsp;<span class="product_name"></span>
</div>

<div class="product_attributes"></div>
</div>
</div>
<div class="vm_cart_products">
<div class="container">
<?php foreach ($data->products as $product)
{
if ($show_price) { ?>

  <div class="prices" style="float: right;"><?php echo  $product['prices'?></div>
<?php ?>
<div class="product_row">
<span class="quantity"><?php echo  $product['quantity'?></span>&nbsp;|&nbsp;<span class="product_name"><?php echo  $product['product_name'?></span>
</div>
<?php if ( !empty($product['product_attributes']) ) { ?>
<div class="product_attributes"><?php echo  $product['product_attributes'?></div>

<?php }
}
?>

</div>
</div>
<?php ?>

<div class="total_products" style="float:left;"><?php echo  $data->totalProductTxt ?>&nbsp;|&nbsp;</div>
<div class="total" style="float: right;">
<?php if ($data->totalProduct) echo  $data->billTotal?>
</div>
<div class="show_cart">

<?php if ($data->totalProduct) echo  $data->cart_show?>
</div>
<div style="clear:both;"></div>

<noscript>
<?php echo JText::_('MOD_VIRTUEMART_CART_AJAX_CART_PLZ_JAVASCRIPT'?>
</noscript>
</div>


i also would not even know how to tell them to cache or not?! my caching is off systemwide anywide

here's a test url: http://www.druckenlassen.com/t-shirts-kaufen

thanks for your help!
Title: Re: mod_cart does not update properly VM2.0.12b
Post by: bytelord on November 30, 2012, 18:48:57 PM
Hi,

There is no way ... you cache the vm pages!! I open the cart page on another browser and brings me the quantity and other details! no way this happened, except if you are using a custom plugins for wishlists, etc ...
please check for any cache plugins are enabled on joomla backend -> extenstions -> plugins, also please check your template configuration for any cache options also refer to your joomla template vendor about that if you are not aware how is working.

Regards
Title: Re: mod_cart does not update properly VM2.0.12b
Post by: dorkus on December 01, 2012, 09:39:57 AM
very weird. i disabled the cache plugin and now it works....

thanks!
Title: Re: mod_cart does not update properly VM2.0.12b
Post by: bytelord on December 01, 2012, 17:11:29 PM
Hello,

Great you solved.
No weird, Was not only caching, was also compressing js libraries, etc, etc, etc

CSS compression, JS optimization/minify/compression and caching should be done when you your project is get finished. You have to deeper on that. Also almost all of the sites enabling by default cache, CSS, JS optimization will have issues, you have to solve that issues one by one. Personally i leave site caching, js, css compression, minify,etc  as the last step when develop a site, never used them at the development state.

Regards