VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: sscheidegger on May 16, 2014, 15:21:30 PM

Title: Cart Module not updating
Post by: sscheidegger on May 16, 2014, 15:21:30 PM
Hi all

After updating to VM 2.6.1 and J 2.5.20 I have a problem with my cart module. The js/ajax updating the cart module when someone adds a product seems to be broken. I already removed all overrides and disabled some other components in joomla.

So far I tracked the problem down to vmprices.js in the productUpdate function. The function gets called, but the callback function in getJSON is never called...

Does anyone else have the same problem? Any idea what could be the reason?

Thanks!
Title: Re: Cart Module not updating
Post by: GJC Web Design on May 16, 2014, 15:54:21 PM
on a clean upgrade to 2.6.x can confirm std. vm cart module works fine

live url?
Title: Re: Cart Module not updating
Post by: sscheidegger on May 19, 2014, 10:12:58 AM
Ok, I just set up a test environment with a clean install of J 2.5.20 and VM 2.6.1. The problem exists also there: When I click on "Add to Cart", the module is not updated. Only after a refresh or going to a different page, the cart module shows the newly added product.

Detailed steps to reproduce the problem:
- Set-up VM 2.6.1, do the basic configurations and add some products
- Activate the VM - Shopping Cart module
- Go the product details page and click on "Add to Cart"
  --> A pop-up message is displayed saying "1 x Product xy was added to your cart. The product quantity has been updated." At the same time, the shopping cart should show "1 x Product xy  10,00 Euro, Total: 10,00 Euro" or similar. But in VM 2.6.1 it still says "Cart empty"
- Don't click on "Continue Shopping" or "Show Cart", but click the little cross to close the pop-up message.
  --> Now you're back on the page and it seems that the cart is still empty.
- Refresh the page
  --> Now the cart module is updated

This bug might seem not very important, but we have a shop where we don't show the pop-up message. The expected behavior is, that whenever a customer clicks on "Add to Cart", the cart module updates (without a page refresh). With this not working, the customer is very confused, probably clicks several times on "Add to Cart" and nothing happens and as soon as he navigates to a different page, he has many products in his cart!
Title: Re: Cart Module not updating
Post by: gripped on May 21, 2014, 11:41:50 AM
Same here and on 2.6.2 as well.

I mentioned in another thread (http://forum.virtuemart.net/index.php?topic=123848.0) I have overridden padded.php so that 'continue shopping' stays on the same page and does not reload.
On 2.6.0a you can see the cart module update at the same time as the modal appears, before clicking 'continue shopping'.

On 2.6.2 with my override in place the cart does not update at all until the page is reloaded manually or a different page is loaded.

With my override removed the cart does not update at the same time as the modal appears, as it did before. Only after  'continue shopping' is clicked and the page automatically reloads.
Title: Re: Cart Module not updating
Post by: gripped on May 21, 2014, 12:22:33 PM
OK

The only thing  I've discovered about this so far is that in 2.6.2 I get this in the chromium console when add to cart is clicked

GET http://test.ecigsoutlet.co.uk/index.php?option=com_virtuemart&nosef=1&view=cart&task=viewJS&format=json&_=1400667587576 500 (Internal Server Error) jquery.min.js:2
send jquery.min.js:2
p.extend.ajax jquery.min.js:2
p.(anonymous function) jquery.min.js:2
p.extend.getJSON jquery.min.js:2
Virtuemart.productUpdate vmprices.js:29
(anonymous function) vmprices.js:96
k jquery.min.js:2
l.fireWith jquery.min.js:2
y jquery.min.js:2
d jquery.min.js:2


Doesn't happen in 2.6.0a
Title: Re: Cart Module not updating
Post by: gripped on May 21, 2014, 12:55:41 PM
same '500 (Internal Server Error)' on a fresh install (2.5.20, 2.6.2) with sample data when add to cart is clicked
Title: Re: Cart Module not updating
Post by: gripped on May 21, 2014, 13:13:42 PM
seems to be because $lang is not defined anymore

used to be at components/com_virtuemart/controllers/cart.php line 168

$lang = JFactory::getLanguage();


Used a few lines after
$this->data->billTotal = $lang->_('COM_VIRTUEMART_CART_TOTAL') . ' : <strong>' . $this->data->billTotal . '</strong>';

Putting the line back fixes the cart ajax but I doubt it's the correct solution.
Title: Re: Cart Module not updating
Post by: sscheidegger on May 21, 2014, 15:27:16 PM
Adding the line to cart.php works as a temporary workaround. Now I can run the website again without the modal. Thanks a lot for analyzing this!

Could someone from the dev team fix this for the next version?
Title: Re: Cart Module not updating
Post by: Milbo on May 21, 2014, 16:00:55 PM
Just replace the $lang-> by vmText:: that should be the correct fix
Title: Re: Cart Module not updating 2.6.2
Post by: AH on May 21, 2014, 16:02:01 PM
Hmm something changed that broke it!

I will test Milbos suggestion

I did not want the users to have to click any link in the modal popup to continue shopping  as this "continue shopping" ends up reloading the page and hence a wasted server hit.

So I change vmprice.js to make the modal popup timeout and removed the contimue link from padded.php (old school!)

Hence I never have users clicking "continue"




Title: Re: Cart Module not updating
Post by: AH on May 21, 2014, 16:10:50 PM
Milbo's fix tested and working  ;)
components\com_virtuemart\controllers\cart.php

Line 186

$this->data->billTotal = vmText::_('COM_VIRTUEMART_CART_TOTAL') . ' : <strong>' . $this->data->billTotal . '</strong>';

Cart updates as expected

I thank you Milbo on behalf of many!
Title: Re: Cart Module not updating
Post by: borro on May 29, 2014, 15:14:25 PM
Quote from: gripped on May 21, 2014, 13:13:42 PM
seems to be because $lang is not defined anymore
Thank you very much. Please tell how did you understand that? I want to learn from you to be able to solve similar problems in future
Title: Re: Cart Module not updating
Post by: borro on May 30, 2014, 09:09:17 AM
Quote from: Hutson on May 21, 2014, 16:10:50 PM
Line 186
$this->data->billTotal = vmText::_('COM_VIRTUEMART_CART_TOTAL') . ' : <strong>' . $this->data->billTotal . '</strong>';
Cart updates as expected
here is a litle problem. If your shop uses English language everything works fine. But if you are using another default language the correct COM_VIRTUEMART_CART_TOTAL value is being taken only at page reload. And if you fills your cart then every ajax update is using english value of 'COM_VIRTUEMART_CART_TOTAL' constant. How to fix this issue?
Title: Re: Cart Module not updating
Post by: gripped on May 30, 2014, 19:56:32 PM
Quote from: borro on May 29, 2014, 15:14:25 PM
Quote from: gripped on May 21, 2014, 13:13:42 PM
seems to be because $lang is not defined anymore
Thank you very much. Please tell how did you understand that? I want to learn from you to be able to solve similar problems in future
By using the chromium console, looking at the server error.log and once I'd seen the error comparing the code prior to the update and after.
I can't code but experience means I can sometimes spot the odd bug or 'hack' code a bit.
The only advice I can give is study the code and the logs and try to figure it out. Sometimes I can. Most often I can't.
Title: Re: Cart Module not updating
Post by: borro on May 31, 2014, 08:59:09 AM
Quote from: gripped on May 30, 2014, 19:56:32 PM
By using the chromium console, looking at the server error.log and once I'd seen the error comparing the code prior to the update and after.
I can't code but experience means I can sometimes spot the odd bug or 'hack' code a bit.
The only advice I can give is study the code and the logs and try to figure it out. Sometimes I can. Most often I can't.
Thank you. Were you watching an html code in chromium or some php code? Where the error.log usually can be found?
Title: Re: Cart Module not updating
Post by: gripped on May 31, 2014, 10:49:14 AM
In chromium. Right click , Inspect element, Console.
Error log should be on the the server. Where depends on the server settings.
Title: Re: Cart Module not updating
Post by: ifs-net on December 17, 2014, 05:01:38 AM
Quote from: Milbo on May 21, 2014, 16:00:55 PM
Just replace the $lang-> by vmText:: that should be the correct fix

Hello,

Mine is already "wmText" but I have a similar problem

www.enmodabutik.com

- when your cart is empty, when you click "add to cart" on an item page, fancybox is coming and if you wait 2 seconds cart modul icon dissapears...
- when there is an item in your cart and you click "add to cart" for an other item, this time module icon dissapears and module text becomes unlinkable...

I need help please

My config is, VirtueMart 2.6.12.2 & Joomla! 2.5.27
Title: Re: Cart Module not updating
Post by: Milbo on December 17, 2014, 17:07:22 PM
Very likely a jquery problem. Disable your template and use the standard template to check if your template is responsible for it.
Title: Re: Cart Module not updating
Post by: ifs-net on December 18, 2014, 19:52:30 PM
Hi,
Thanks for your quick reply.

I am not able to understand if it is a template error or not..
I tried with beez5 and atomic templates but there is no fancy box coming when I click add to cart...
Title: Re: Cart Module not updating
Post by: Milbo on December 18, 2014, 20:19:20 PM
Maybe it is a plugin.
Title: Re: Cart Module not updating
Post by: ifs-net on December 18, 2014, 22:35:46 PM
Milbo,

You have 100% right..
This is a template issue.

I installed an other virtuemart template and there is no problem, it is working fine in any case.

But I am not able to take any support from http://www.virtuemarttemplates.net/
I do not know how to fix it...
The problem is that I finished all site and it is live... The only problem left is this one..
Title: Re: Cart Module not updating
Post by: jenkinhill on December 19, 2014, 00:07:05 AM
And it looks like virtuemarttemplates.net hide their identity and real address so you can't send the boys round to sort them out. That would be illegal in Europe where a real contact address & phone number must be published.

Good luck sorting them out.
Title: Re: Cart Module not updating
Post by: Milbo on December 19, 2014, 10:45:42 AM
Go in the template file, and check there is somewhere (at the end of the file) an entry for jquery, just delete it.
Title: Re: Cart Module not updating
Post by: ifs-net on December 22, 2014, 20:37:16 PM
Hi Milbo,

Thanks a lot for your help.

I tried to remove this one;


<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#cartpanel').on('click', function() {
jQuery('div.panel2').animate({
'height': 'show'
}, 300, function() {
jQuery('div.cartpanel').fadeIn(200);
});
});
jQuery('span.closecart').on('click', function() {
jQuery('div.cartpanel').fadeOut(200, function() {
jQuery('div.panel2').animate({
'height': 'hide'
}, 300);
});
});
});
</script>


which is under "/home/medisana/public_html/templates/flat/html/mod_virtuemart_cart/default.php"

But It has not work... I will have a look at the other files...
Title: Re: Cart Module not updating
Post by: ifs-net on December 22, 2014, 20:55:12 PM
Maybe this one is the right file to fix ?
"/home/medisana/public_html/templates/flat/html/com_virtuemart/productdetails/default.php"


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

// addon for joomla modal Box
JHTML::_('behavior.modal');
// JHTML::_('behavior.tooltip');
if(VmConfig::get('usefancy',1)){
vmJsApi::js'fancybox/jquery.fancybox-1.3.4.pack');
vmJsApi::css('jquery.fancybox-1.3.4');
$box "$.fancybox({
href: '" 
$this->askquestion_url "',
type: 'iframe',
height: '550'
});"
;
} else {
vmJsApi::js'facebox' );
vmJsApi::css'facebox' );
$box "$.facebox({
iframe: '" 
$this->askquestion_url "',
rev: 'iframe|550|550'
});"
;
}
$document JFactory::getDocument();
$document->addScriptDeclaration("
//<![CDATA[
jQuery(document).ready(function($) {
$('a.ask-a-question').click( function(){
"
.$box."
return false ;
});
/* $('.additional-images a').mouseover(function() {
var himg = this.href ;
var extension=himg.substring(himg.lastIndexOf('.')+1);
if (extension =='png' || extension =='jpg' || extension =='gif') {
$('.main-image img').attr('src',himg );
}
console.log(extension)
});*/
});
//]]>
"
);
/* Let's see if we found the product */
if (empty($this->product)) {
    echo 
JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
    echo 
'<br /><br />  ' $this->continue_link_html;
    return;
}

?>


<div class="productdetails-view productdetails">

    <?php
    
// Product Navigation
    
if (VmConfig::get('product_navigation'1)) {
?>

        <div class="product-neighbours">
    <?php
    if (!empty(
$this->product->neighbours ['previous'][0])) {
$prev_link JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->neighbours ['previous'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' $this->product->virtuemart_category_id);
echo JHTML::_('link'$prev_link$this->product->neighbours ['previous'][0]
['product_name'], array('class' => 'previous-page'));
    }
    if (!empty($this->product->neighbours ['next'][0])) {
$next_link JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->neighbours ['next'][0] ['virtuemart_product_id'] . '&virtuemart_category_id=' $this->product->virtuemart_category_id);
echo JHTML::_('link'$next_link$this->product->neighbours ['next'][0] ['product_name'], array('class' => 'next-page'));
    }
    ?>

    <div class="clear"></div>
        </div>
    <?php // Product Navigation END
    
?>


    <?php // Product Title   ?>
    <h1><?php echo $this->product->product_name ?> <?php echo $this->edit_link?></h1>
    <?php // Product Title END   ?>

    <?php // afterDisplayTitle Event
    
echo $this->product->event->afterDisplayTitle ?>


    <?php

    
if (!empty($this->product->customfieldsSorted['ontop'])) {
$this->position 'ontop';
echo $this->loadTemplate('customfields');
    } 
// Product Custom ontop end
    
?>


<div class="row-fluid product-additional-nav">
<div class="span6">
<?php // Back To Category Button
if ($this->product->virtuemart_category_id) {
$catURL =  JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$this->product->virtuemart_category_id);
$categoryName $this->product->category_name ;
} else {
$catURL =  JRoute::_('index.php?option=com_virtuemart');
$categoryName jText::_('COM_VIRTUEMART_SHOP_HOME') ;
}
?>

<div class="back-to-category">
<a href="<?php echo $catURL ?>" class="" title="<?php echo $categoryName ?>"><?php echo JText::sprintf('COM_VIRTUEMART_CATEGORY_BACK_TO',$categoryName?></a>
</div>
</div>
<div class="span6">
<?php
// PDF - Print - Email Icon
if (VmConfig::get('show_emailfriend') || VmConfig::get('show_printicon') || VmConfig::get('pdf_button_enable')) {
?>

<div class="icons hidden-phone">
<?php
//$link = (JVM_VERSION===1) ? 'index2.php' : 'index.php';
$link 'index.php?tmpl=component&option=com_virtuemart&view=productdetails&virtuemart_product_id=' $this->product->virtuemart_product_id;
$MailLink 'index.php?option=com_virtuemart&view=productdetails&task=recommend&virtuemart_product_id=' $this->product->virtuemart_product_id '&virtuemart_category_id=' $this->product->virtuemart_category_id '&tmpl=component';

if (VmConfig::get('pdf_icon'1) == '1') {
echo "<span class=\"vm-pdf-button\">".$this->linkIcon($link '&format=pdf''COM_VIRTUEMART_PDF''pdf_button''pdf_button_enable'false)."</span>";
}
echo "<span class=\"vm-print-button\">".$this->linkIcon($link '&print=1''COM_VIRTUEMART_PRINT''printButton''show_printicon')."</span>";
echo "<span class=\"vm-email-button\">".$this->linkIcon($MailLink'COM_VIRTUEMART_EMAIL''emailButton''show_emailfriend')."</span>";
?>

<div class="clear"></div>
</div>
<?php // PDF - Print - Email Icon END
?>

</div>
</div>

    <div class="row-fluid">
<div class="span6 floatleft">
<?php echo $this->loadTemplate('images'); ?>

<?php
if ($this->showRating) {
    $maxrating VmConfig::get('vm_maximum_rating_scale'5);

    if (empty($this->rating)) {
?>

<span class="vote"><?php echo JText::_('COM_VIRTUEMART_RATING') . ' ' JText::_('COM_VIRTUEMART_UNRATED'?></span>
    <?php
} else {
    $ratingwidth $this->rating->rating 24//I don't use round as percetntage with works perfect, as for me
    ?>

<span class="vote">
<?php echo JText::_('COM_VIRTUEMART_RATING') . ' ' round($this->rating->rating) . '/' $maxrating?> <span title=" <?php echo (JText::_("COM_VIRTUEMART_RATING_TITLE") . round($this->rating->rating) . '/' $maxrating?>" class="ratingbox" style="display:inline-block;">
<span class="stars-orange" style="width:<?php echo $ratingwidth.'px'?>">
</span>
    </span>
</span>
<?php
    }
}
?>


</div>

<div class="span6 floatright">
    <div class="spacer-buy-area">

<?php
// TODO in Multi-Vendor not needed at the moment and just would lead to confusion
/* $link = JRoute::_('index2.php?option=com_virtuemart&view=virtuemart&task=vendorinfo&virtuemart_vendor_id='.$this->product->virtuemart_vendor_id);
  $text = JText::_('COM_VIRTUEMART_VENDOR_FORM_INFO_LBL');
  echo '<span class="bold">'. JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_VENDOR_LBL'). '</span>'; ?>
<a class="modal" href="<?php echo $link ?>"><?php echo $text ?></a><br />
*/

// Product Short Description
if (!empty($this->product->product_s_desc)) {
?>
<div class="product-short-description"><span class="module-arrow"></span>
<?php
/** @todo Test if content plugins modify the product description */
echo nl2br($this->product->product_s_desc);
?>

</div>
<?php
// Product Short Description END
 
?>


<?php
// Manufacturer of the Product
if (VmConfig::get('show_manufacturers'1) && !empty($this->product->virtuemart_manufacturer_id)) {
    echo $this->loadTemplate('manufacturer');
}
?>


<?php

if (is_array($this->productDisplayShipments)) {
    foreach ($this->productDisplayShipments as $productDisplayShipment) {
echo $productDisplayShipment '<br />';
    }
}
if (is_array($this->productDisplayPayments)) {
    foreach ($this->productDisplayPayments as $productDisplayPayment) {
echo $productDisplayPayment '<br />';
    }
}
// Product Price
    // the test is done in show_prices
//if ($this->show_prices and (empty($this->product->images[0]) or $this->product->images[0]->file_is_downloadable == 0)) {
    echo $this->loadTemplate('showprices');
//}
?>


<?php
// Add To Cart Button
//  if (!empty($this->product->prices) and !empty($this->product->images[0]) and $this->product->images[0]->file_is_downloadable==0 ) {
if (!VmConfig::get('use_as_catalog'0) and !empty($this->product->prices['salesPrice'])) {
    echo $this->loadTemplate('addtocart');
}  // Add To Cart Button END
?>


<?php
// Ask a question about this product
if (VmConfig::get('ask_question'1) == 1) {
    
?>

    <div class="ask-a-question">
        <a class="ask-a-question" href="<?php echo $this->askquestion_url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>
        <!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $this->askquestion_url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>-->
    </div>
<?php }
?>


<?php
// Availability Image
$stockhandle VmConfig::get('stockhandle''none');
if (($this->product->product_in_stock $this->product->product_ordered) < 1) {
if ($stockhandle == 'risetime' and VmConfig::get('rised_availability') and empty($this->product->product_availability)) {
?>
<div class="availability">
    <?php echo (file_exists(JPATH_BASE DS VmConfig::get('assets_general_path') . 'images/availability/' VmConfig::get('rised_availability'))) ? JHTML::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' VmConfig::get('rised_availability''7d.gif'), VmConfig::get('rised_availability''7d.gif'), array('class' => 'availability')) : VmConfig::get('rised_availability'); ?>
</div>
    <?php
} else if (!empty($this->product->product_availability)) {
?>

<div class="availability">
<?php echo (file_exists(JPATH_BASE DS VmConfig::get('assets_general_path') . 'images/availability/' $this->product->product_availability)) ? JHTML::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' $this->product->product_availability$this->product->product_availability, array('class' => 'availability')) : $this->product->product_availability?>
</div>
<?php
}
}
?>


    </div>
</div>
<div class="clear"></div>
    </div>

<?php // event onContentBeforeDisplay
echo $this->product->event->beforeDisplayContent?>


<?php
// Product Description
if (!empty($this->product->product_desc)) {
    ?>

        <div class="product-description">
<?php /** @todo Test if content plugins modify the product description */ ?>
    <span class="title"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE'?></span>
<?php echo $this->product->product_desc?>
        </div>
<?php
    
// Product Description END

    
if (!empty($this->product->customfieldsSorted['normal'])) {
$this->position 'normal';
echo $this->loadTemplate('customfields');
    } 
// Product custom_fields END
    // Product Packaging
    
$product_packaging '';
    if (
$this->product->product_box) {
?>

        <div class="product-box">
    <?php
        echo 
JText::_('COM_VIRTUEMART_PRODUCT_UNITS_IN_BOX') .$this->product->product_box;
    ?>

        </div>
    <?php // Product Packaging END
    
?>


    <?php
    
// Product Files
    // foreach ($this->product->images as $fkey => $file) {
    // Todo add downloadable files again
    // if( $file->filesize > 0.5) $filesize_display = ' ('. number_format($file->filesize, 2,',','.')." MB)";
    // else $filesize_display = ' ('. number_format($file->filesize*1024, 2,',','.')." KB)";

    /* Show pdf in a new Window, other file types will be offered as download */
    // $target = stristr($file->file_mimetype, "pdf") ? "_blank" : "_self";
    // $link = JRoute::_('index.php?view=productdetails&task=getfile&virtuemart_media_id='.$file->virtuemart_media_id.'&virtuemart_product_id='.$this->product->virtuemart_product_id);
    // echo JHTMl::_('link', $link, $file->file_title.$filesize_display, array('target' => $target));
    // }
    
if (!empty($this->product->customfieldsRelatedProducts)) {
echo $this->loadTemplate('relatedproducts');
    } 
// Product customfieldsRelatedProducts END

    
if (!empty($this->product->customfieldsRelatedCategories)) {
echo $this->loadTemplate('relatedcategories');
    } 
// Product customfieldsRelatedCategories END
    // Show child categories
    
if (VmConfig::get('showCategory'1)) {
echo $this->loadTemplate('showcategory');
    }
    if (!empty(
$this->product->customfieldsSorted['onbot'])) {
    
$this->position='onbot';
    
echo $this->loadTemplate('customfields');
    } 
// Product Custom ontop end
    
?>


<?php // onContentAfterDisplay event
echo $this->product->event->afterDisplayContent?>


<?php
echo $this->loadTemplate('reviews');
?>

</div>

Title: Re: Cart Module not updating
Post by: ifs-net on December 22, 2014, 21:23:34 PM
That must be somewhere in that file... I think I need to put a refresh function for the cart... Or I need to delete the duplicated script...
"/home/medisana/public_html/templates/flat/html/mod_virtuemart_cart/default.php"


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


<div class="vmCartModule <?php echo $params->get('moduleclass_sfx'); ?>" id="vmCartModule">

<?php if ($data->totalProduct and $show_price) { ?><div class="show-both"><?php ?>
<div class="total_products">
<?php if ($data->totalProduct>1$data->totalProductTxt2 '<div class="total-items">'.JText::sprintf('TPL_FLAT_ITEM_S'$data->totalProduct).'</div>';
else if (
$data->totalProduct == 1$data->totalProductTxt2 '<div class="total-items">'.JText::_('TPL_FLAT_ITEM').'</div>';
else 
$data->totalProductTxt2 '<a href="#" class="cart-button"><div class="popover bottom"><div class="arrow"></div><div class="popover-content"><p>'.JText::_('COM_VIRTUEMART_EMPTY_CART').'</p></div></div></a>';
echo 
$data->totalProductTxt2?>


</div>

<?php if ($data->totalProduct and $show_price) { ?></div><?php ?>
<?php if ($data->totalProduct and $show_price) { ?>
<div class="show-cart"><a id="cartpanel" class="cart-button" href="javascript:void(0);"><?php echo JText::_('COM_VIRTUEMART_CART_SHOW'?></a></div>

<?php if ($show_product_list) { ?>

<div class="panel2">
<div class="cartpanel">
<span class="closecart">&times;</span>
<div class="arrow"></div>
<?php if ($data->totalProduct and $show_price) echo "<span class=\"show-cart-link\">".$data->cart_show."</span>"?>

<div id="hiddencontainer" style="display: none; ">
<div class="cart-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="cart-container">

<?php
foreach ($data->products as $product)
?>
<div class="product-cart-row"> <?php
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;x&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>
<?php
}
?>

</div>
</div>

<div class="total"><?php if ($data->totalProduct and $show_price) echo  $data->billTotal?></div>

</div>
</div>

<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#cartpanel').on('click', function() {
jQuery('div.panel2').animate({
'height': 'show'
}, 300, function() {
jQuery('div.cartpanel').fadeIn(200);
});
});
jQuery('span.closecart').on('click', function() {
jQuery('div.cartpanel').fadeOut(200, function() {
jQuery('div.panel2').animate({
'height': 'hide'
}, 300);
});
});
});
</script>

<?php ?>
<?php ?>


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





Title: Re: Cart Module not updating
Post by: ifs-net on December 23, 2014, 11:07:00 AM
When I check the page source of product page (or fancybox) with the browser, I can see that there are too many scripts, but I do not know which one is conflicting, and where can I find and delete it


  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js?vmver=Revision: 8558" type="text/javascript"></script>
  <script src="/components/com_virtuemart/assets/js/jquery.noconflict.js?vmver=Revision: 8558" type="text/javascript"></script>
  <script src="/components/com_virtuemart/assets/js/vmsite.js?vmver=Revision: 8558" type="text/javascript"></script>
  <script src="/components/com_virtuemart/assets/js/fancybox/jquery.fancybox-1.3.4.pack.js?vmver=Revision: 8558" type="text/javascript"></script>
  <script src="/components/com_virtuemart/assets/js/vmprices.js?vmver=Revision: 8558" type="text/javascript"></script>
  <script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/media/system/js/core.js" type="text/javascript"></script>
  <script src="/media/system/js/modal.js" type="text/javascript"></script>
  <script src="/templates/flat/js/jquery.elevateZoom-3.0.8.min.js" type="text/javascript"></script>
  <script src="/components/com_jfbconnect/includes/jfbconnect.js?v=6" type="text/javascript"></script>
  <script src="/media/sourcecoast/js/jq-bootstrap-1.8.3.js" type="text/javascript"></script>
  <script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
  <script type="text/javascript">


I need some help please
Title: Re: Cart Module not updating
Post by: ifs-net on December 23, 2014, 19:29:53 PM
Hi,

I need help please ...
I am also open for professional help. I can pay for the fix.
I will appreciate if someone can help me to fix it.
Thanks a lot
Title: Re: Cart Module not updating
Post by: ifs-net on December 23, 2014, 22:14:30 PM
OK So step step by step I am coming to the solution I guess.
I have checked a product page with firebug. And the error message I am getting is this;
"Error: You must specify a valid JavaScript API Domain as part of this key's configuration."

So now I need to learn where is coming this and how to solve....
Title: Re: Cart Module not updating
Post by: ifs-net on December 23, 2014, 22:38:06 PM
Quote from: ifs-net on December 23, 2014, 22:14:30 PM
OK So step step by step I am coming to the solution I guess.
I have checked a product page with firebug. And the error message I am getting is this;
"Error: You must specify a valid JavaScript API Domain as part of this key's configuration."

So now I need to learn where is coming this and how to solve....

It looks that this has no relation with the problem, this is a problem about linkedin API

AND THERE IS NO OTHER ERROR SEEN ON FIREBUG.


WORST TEMPLATE EVER http://virtuemarttemplates.net/
Title: Re: Cart Module not updating
Post by: ifs-net on December 24, 2014, 00:41:20 AM
to see the problem please go to
www.medisanatr.com
Title: Re: Cart Module not updating
Post by: AH on December 24, 2014, 10:43:34 AM
That is a custom cart module - I suggest you talk to the developers
Title: Re: Cart Module not updating
Post by: GJC Web Design on December 24, 2014, 11:12:35 AM
QuoteI can see that there are too many scripts, but I do not know which one is conflicting, and where can I find and delete it

IMHO all the scripts there are fine and should be there
Title: Re: Cart Module not updating
Post by: ifs-net on December 24, 2014, 14:36:25 PM
Quote from: GJC Web Design on December 24, 2014, 11:12:35 AM
QuoteI can see that there are too many scripts, but I do not know which one is conflicting, and where can I find and delete it

IMHO all the scripts there are fine and should be there

Yes I think so because I am not having any script error with firebug...
Title: Re: Cart Module not updating
Post by: GJC Web Design on December 24, 2014, 14:40:42 PM
items are being added to cart - it just the cart module not updating - try the standard VM cart module and remove any over ride for it
Title: Re: Cart Module not updating
Post by: ifs-net on December 24, 2014, 14:43:49 PM
I am unpublishing the custom one.
If you can please have a look if it will work for you ?
For me it has not work..
Title: Re: Cart Module not updating
Post by: GJC Web Design on December 24, 2014, 14:48:13 PM
that is most definitely NOT the native cart module that is there!!!!!!!

Title: Re: Cart Module not updating
Post by: ifs-net on December 24, 2014, 14:49:31 PM
Quote from: GJC Web Design on December 24, 2014, 14:40:42 PM
items are being added to cart - it just the cart module not updating - try the standard VM cart module and remove any over ride for it

Yes you have right the problem is the module not the cart, module is not updating