Author Topic: Display modal popup upon 'Add to cart' not working  (Read 41681 times)

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2657
Re: Display modal popup upon 'Add to cart' not working
« Reply #15 on: September 12, 2013, 10:15:38 am »
It's clearly issue with your Joomla template. You are using commercial VM theme from yagendoo. See this http://forum.virtuemart.net/index.php?topic=108212.0

dbcig2013

  • Beginner
  • *
  • Posts: 36
Re: Display modal popup upon 'Add to cart' not working
« Reply #16 on: September 29, 2013, 12:32:19 pm »
I had the same problem ( totaly intermittent !!) and impossible to solve it . For me!!
i m not efficient enought in php coding  to investigate more ...

i finally uncheked the """Display modal popup upon 'Add to cart'""  to be sure not loosing more customer.

What is sure: this  ""Display modal popup upon 'Add to cart'"" seems to create a lot of issues for many people, .

And if you have a look in the others forum (i.e where you bought your customize template) it appears this modal  module need to be investigate a little bit more as most of the people unchecked it at the end !

=> Perhaps pb with provider, browser, template, php versions.etc.... probably it will be difficult to solve.

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2657
Re: Display modal popup upon 'Add to cart' not working
« Reply #17 on: September 29, 2013, 14:19:19 pm »
I had the same problem ( totaly intermittent !!) and impossible to solve it .
I disagree

Same problem = Same solution = Possible to solve.

Either you haven't any problem or you still need to give YOUR details about your specific issue.

dbcig2013

  • Beginner
  • *
  • Posts: 36
Re: Display modal popup upon 'Add to cart' not working
« Reply #18 on: September 29, 2013, 16:09:36 pm »
last joomla version ; last virtuemart version ( 22c)

Sure, there is a solution !! that is why we all post and all esperate the post will be read and a solution gave soon .

As the site is in production, it is not possible for me to try to resolved it. I already spend night and day without acceptable results.   I have no other choice than unchecked this modal option for the moment.

but i continue to investigate .
for the moment, i eliminate the pb like that :

unchecked "Display modal popup upon 'Add to cart' "
And : Configuration > Template (scroll down little bit and look at the "Activate Css Styles & Javascripts" section)

Make sure "Fancybox" is disabled.

And adding the 2 last line in the template

....
</body>
</html>

<?php
   JHTML::stylesheet("facebox.css","components/com_virtuemart/assets/css/");
   JHTML::script("facebox.js", "components/com_virtuemart/assets/js/");
?>

ThemeRox

  • Beginner
  • *
  • Posts: 2
  • Skype Name: niamulhasan23
Re: Display modal popup upon 'Add to cart' not working
« Reply #19 on: October 07, 2013, 21:52:04 pm »
Really unhappy with the virtuemart update.We are developing premium virtuemart template and after update add to cart is not working. Its not adding any product. I don't know why every update comes with bug or errors.
All of our template down for this issue. Check here the running version is previous version and its working fine
http://themerox.com/themeforest/bestshop
But when updated to version 2.0.24 its stop adding everything. I had checked everything code and console no - error or conflict. Updated main file and also IO. I had checked two source code this part is not comming after update in source code
Quote
vmLang = "";
vmCartText = ' was added to your cart.' ;
vmCartError = 'There was an error while updating your cart.' ;
loadingImage = '/themeforest/bestshop/components/com_virtuemart/assets/images/facebox/loading.gif' ;
closeImage = '/themeforest/bestshop/components/com_virtuemart/assets/images/facebox/closelabel.png' ;
Virtuemart.addtocart_popup = '1' ;
faceboxHtml = '<div id="facebox" style="display:none;"><div class="popup"><div class="content"></div> <a href="#" class="close"></a></div></div>'  ;

I had checked by disable my template to default template its not working too. I had added Ad to cart at virtuemart front page by this code
Quote
<form method="post" class="product" action="index.php" id="addtocartproduct<?php echo $product->virtuemart_product_id ?>">
                        <div class="width_sope2 addtocart-bar">
                              <?php // Display the quantity box ?>
                              <!-- <label for="quantity<?php echo $this->product->virtuemart_product_id;?>" class="quantity_box"><?php echo JText::_('COM_VIRTUEMART_CART_QUANTITY'); ?>: </label> -->
                              <span class="quantity-box">
                                 <input style="display:none;" type="text" class="quantity-input" name="quantity[]" value="1" />
                              </span>
                              
                              <?php // Display the quantity box END ?>

                              <?php // Add the button
                              $button_lbl = JText::_('ROX_COM_VIRTUEMART_CART_ADD_TO');
                              $button_cls = ''; //$button_cls = 'addtocart_button';
                              if (VmConfig::get('check_stock') == '1' && !$this->product->product_in_stock) {
                                 $button_lbl = JText::_('COM_VIRTUEMART_CART_NOTIFY');
                                 $button_cls = 'notify-button';
                              } ?>

                              <?php // Display the add to cart button ?>
                              <span class="addtocart-button">
                                 <input type="submit" name="addtocart"  class="addtocart-button" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
                              </span>

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

                           <?php // Display the add to cart button END ?>
                           <input type="hidden" class="pname" value="<?php echo $product->product_name ?>">
                           <input type="hidden" name="option" value="com_virtuemart" />
                           <input type="hidden" name="view" value="cart" />
                           <noscript><input type="hidden" name="task" value="add" /></noscript>
                           <input type="hidden" name="virtuemart_product_id[]" value="<?php echo $product->virtuemart_product_id ?>" />
                           
                        </form>

Everything was working nice at old version. But for now its totally Sucks. Any one can confirm its a bug or not? Its really painfull.

ThemeRox

  • Beginner
  • *
  • Posts: 2
  • Skype Name: niamulhasan23
Re: Display modal popup upon 'Add to cart' not working
« Reply #20 on: October 07, 2013, 23:48:32 pm »
Having the same problem on the category-page but not on the product page:
http://shamaanirumpu.net/rumpu-ukon%20puoti/fi/nayttaa-etusivun/shamaanirummut

I have updated for 2.0.22c version both the VM2 and the AIO. But no change. This issue is at least with Chrome and Firefox so not a browser issue (since it does work fine on the product page). Also when clicking Add to cart on the category-page the item is not moved directly to the cart in the upper-corner of the site. Only when moving forward the upper-cart gets updated.

What else can be causing this?

In the middle of making the site multilingual, but quite there yet... having some issues regarding that too...  :(

- Anne


p.s. on this category page it does not work:
http://shamaanirumpu.net/rumpu-ukon%20puoti/fi/nayttaa-etusivun/shamaanirummut

Just add this line vmJsApi::jPrice(); to your com_virtuemart\virtuemart\default_products. I had just found this solution. And its working fine for me now.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2900
  • VirtueMart Version: 3.4
Re: Display modal popup upon 'Add to cart' not working
« Reply #21 on: October 08, 2013, 10:54:19 am »
Glad to see you got it working for your custom  template design.

The update worked for the default templates provided.  Which is what it is coded for.


regards
A

Joomla 3.9.1
php 7.1

admiss

  • Beginner
  • *
  • Posts: 35
  • VirtueMart Version: 2.0.26 d
Re: Display modal popup upon 'Add to cart' not working
« Reply #22 on: January 09, 2014, 09:07:59 am »
Hi everyone,

I use Virtuemart 2.0.22b with Joomla 2.5

I've visited a lot of forums, read a lot of posts, but I'm still really sangry (sad+angry), because I just can't solve this annoying problem >:(

When I "Add to cart" a product, nothing happens. The "confirmation" pop up doesn't appear.
(he added product (and its price) can be seen in "Total" only after one click on product categories/or menu items).



Uncaught TypeError: Object [object Object] has no method 'fancybox'
                         <script>
//<![CDATA[
vmSiteurl = 'http://www.foodhungary.co.uk/' ;
vmLang = '&amp;lang=en' ;
Virtuemart.addtocart_popup = '1' ;
vmCartText = '%2$s x %1$s was added to your cart.' ;
vmCartError = 'There was an error while updating your cart.' ;
loadingImage = '/components/com_virtuemart/assets/images/facebox/loading.gif' ;
closeImage = '/components/com_virtuemart/assets/images/fancybox/fancy_close.png' ;
usefancy = false
//]]>

      window.addEvent('domready', function() {

         SqueezeBox.initialize({});
         SqueezeBox.assign($$('a.modal'), {
            parse: 'rel'
         });
      });

jQuery(document).ready(function () {
   jQuery('.orderlistcontainer').hover(
      function() { jQuery(this).find('.orderlist').stop().show()},
      function() { jQuery(this).find('.orderlist').stop().hide()}
   )
});

<!--//--><![CDATA[//><!--
jQuery.noConflict();
jQuery(document).ready(function() {
if(jQuery("a.lightbox")) { jQuery("a.lightbox").fancybox({'mouseWheel':false,'openEffect':'fade','closeEffect':'fade','nextEffect':'fade','prevEffect':'fade','openSpeed':200,'closeSpeed':200,'nextSpeed':200,'prevSpeed':200,helpers: {overlay: {closeClick:true}}}); }
});
//--><!]]>

//<![CDATA[
jQuery(document).ready(function() {
      jQuery('#VMmenu821_9982 li.VmClose ul').hide();
      jQuery('#VMmenu821_9982 li .VmArrowdown').click(
      function() {

         if (jQuery(this).parent().next('ul').is(':hidden')) {
            jQuery('#VMmenu821_9982 ul:visible').delay(500).slideUp(500,'linear').parents('li').addClass('VmClose').removeClass('VmOpen');
            jQuery(this).parent().next('ul').slideDown(500,'linear');
            jQuery(this).parents('li').addClass('VmOpen').removeClass('VmClose');
         }
      });
   });
//]]>

function keepAlive() {   var myAjax = new Request({method: "get", url: "index.php"}).send();} window.addEvent("domready", function(){ keepAlive.periodical(840000); });
  </script>


Uncaught TypeError: Cannot read property 'settings' of undefined    vmprices.js:88
(anonymous function)                                                                                   vmprices.js:88
k                                                                                                                    jquery.min.js:2
l.fireWith                                                                                                        jquery.min.js:2
y                                                                                                                    jquery.min.js:2
d                                                                                                                    jquery.min.js:2

http://www.foodhungary.co.uk/components/com_virtuemart/assets/js/vmprices.js



Is it possible, that Facebox.js and Fancybox.js are intsalled in the wrong library (place)?
Should I re-install the whole Virtemart and/or Joomla?
WHAT should I do?

[attachment cleanup by admin]

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27433
  • Always on vacation
    • Jenkin Hill Internet
Re: Display modal popup upon 'Add to cart' not working
« Reply #23 on: January 09, 2014, 12:47:13 pm »
Quote
Uncaught TypeError: Object [object Object] has no method 'fancybox'
means that you have a jQuery conflict preventing fancybox from working, probably you are using more than one jQ version. You will need to debug this.  See http://forum.virtuemart.net/index.php?topic=119638.0

Note that your VM version is known to have critical security issues, so you should seriously consider updating. http://forum.virtuemart.net/index.php?topic=118683.0
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.10057 on Joomla 3.9.8 PHP 7.0.33
Testing VM .3.6.0.10075 on Joomla 3.9.8

lenny989

  • Beginner
  • *
  • Posts: 1
Re: Display modal popup upon 'Add to cart' not working
« Reply #24 on: February 20, 2014, 14:22:59 pm »
Hi to all. I'm new here and I apologize if my question is not on right place.

I have problem with Add to cart pop-up.
First, when product details page is opened, in console, I get this:
http://prntscr.com/2u6ktb
Complete URL: http://orasi.hr/index.php?option=com_virtuemart&nosef=1&view=productdetails&task=recalculate&virtuemart_product_id=13&format=json&quantity%3D1%26customPrice%255B0%255D%255B4%255D%3D21%26quantity%255B%255D%3D1%26option%3Dcom_virtuemart%26virtuemart_product_id%255B%255D%3D13
When I click Add to cart button nothing happens and console says:
http://prntscr.com/2u6low
Complete URL: http://orasi.hr/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&quantity%3D1%26customPrice%255B0%255D%255B4%255D%3D21%26quantity%255B%255D%3D1%26option%3Dcom_virtuemart%26view%3Dcart%26virtuemart_product_id%255B%255D%3D13&_=1392902101441

What can be the problem?

OS: Linux
Apache version: 2.2.25
PHP version: 5.4.21
MySQL version: 5.5.35-cll
Joomla template: Default Beez20 visualy edited.
Joomla version: 2.5.11
Virtue mart version:  2.0.20b



jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27433
  • Always on vacation
    • Jenkin Hill Internet
Re: Display modal popup upon 'Add to cart' not working
« Reply #25 on: February 21, 2014, 12:27:00 pm »
You should first update your Joomla & VirtueMart versions.  http://forum.virtuemart.net/index.php?topic=118683.0
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.10057 on Joomla 3.9.8 PHP 7.0.33
Testing VM .3.6.0.10075 on Joomla 3.9.8

Jazajay

  • Jr. Member
  • **
  • Posts: 91
Re: Display modal popup upon 'Add to cart' not working
« Reply #26 on: February 22, 2014, 11:23:13 am »
Hi all
I know this is going back some; but, what people are describing sounds very similar to a problem I was having. You click the button, you got the load circle; but, no pop up box, or update to the cart.

You then went to another page and the cart had been updated.

This too was intermittent.

My problem was a browser specific security issue.

Viewing the page in the non www. version in Firefox prevents the pop up from happening due to a security issue.

Adding the www. to the URL, then pressing the button and it worked fine.

What I would do is, firstly try adding / taking away the www. to the front of the URL.

If this resolves it you need to redirect that version of the domain to the version you have setup in your site setup - that way when every ou click the button you will also be on the right domain. :)

This happened to me in version 2.0.26D and this resolved it in this issue. :)

darkorion

  • Beginner
  • *
  • Posts: 1
Re: Display modal popup upon 'Add to cart' not working
« Reply #27 on: March 16, 2014, 17:29:56 pm »
for popup modal problem:

to solve it only install jquery easy ( http://extensions.joomla.org/extensions/core-enhancements/performance/jquery-scripts/18327 ) and JT Safe Jquery ( http://extensions.joomla.org/extensions/core-enhancements/performance/jquery-scripts/24032 )
go to virtuemart in configuration / themes  and disable virtuemart jquery

work normaly and dont need to change any virtuemart files...

www.highshop.com.br/site

fastestpc

  • Beginner
  • *
  • Posts: 14
Re: Display modal popup upon 'Add to cart' not working
« Reply #28 on: April 05, 2014, 22:16:58 pm »
Hi, I am having an issue with the modal popup after adding an item to cart and also with my cart still showing up as having 0 items in it even after adding something to cart.
....................................

I met the same problem. I think it cause by server, the same code ( Joomla! 2.5.11, lastest virturemart 2.0.26d). One server ok (see http://www.lorca.vn/thi%E1%BA%BFt-b%E1%BB%8B-b%E1%BA%BFp-lorca.html ) and the other ( see http://www.chupanhcuoidep.vn/ao-cuoi-daminh-tan.html). And check inspect on chrome i see erro report

Code: [Select]
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.chupanhcuoidep.vn/templates/dmt/images/vmgeneral/arrow_down.png
Uncaught TypeError: Object [object Object] has no method 'off' script.responsive.js:262
Invalid App Id: Must be a number or numeric string representing the application id. all.js:56
FB.getLoginStatus() called before calling FB.init(). all.js:56
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.chupanhcuoidep.vn/templates/dmt/images/selector-arrow.png
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
Failed to load resource: the server responded with a status of 406 (Not Acceptable) http://www.chupanhcuoidep.vn/index.php?option=com_virtuemart&nosef=1&view=c…anufacturer_id%3D4%26virtuemart_category_id%255B%255D%3D40&_=1396728807878

Change server is work 100%.

delalegro

  • Beginner
  • *
  • Posts: 3
Re: Display modal popup upon 'Add to cart' not working
« Reply #29 on: June 28, 2014, 10:01:00 am »
Hi all
I know this is going back some; but, what people are describing sounds very similar to a problem I was having. You click the button, you got the load circle; but, no pop up box, or update to the cart.

You then went to another page and the cart had been updated.

This too was intermittent.

My problem was a browser specific security issue.

Viewing the page in the non www. version in Firefox prevents the pop up from happening due to a security issue.

Adding the www. to the URL, then pressing the button and it worked fine.

What I would do is, firstly try adding / taking away the www. to the front of the URL.

If this resolves it you need to redirect that version of the domain to the version you have setup in your site setup - that way when every ou click the button you will also be on the right domain. :)

This happened to me in version 2.0.26D and this resolved it in this issue. :)

I had the same problem.
solved it by emptying the $live_site in configuration.php