[Solved] VM 2.0.20b Upgrade Breaks Add to Cart Button

Started by ironlion37, March 15, 2013, 23:32:39 PM

Previous topic - Next topic

ironlion37

Quote from: jenkinhill on March 17, 2013, 23:44:05 PM
@ironlion37  the site threw up this error for me:
Fatal error: require_once() [function.require]: Failed opening required '/home/content/31/10255631/html/jesse/libraries/rokcommon/RokCommon/ClassLoader.php' (include_path='.:/usr/local/php5_3/lib/php') in /home/content/31/10255631/html/jesse/libraries/rokcommon/include.php on line 36

Something to do with RT's rokcommon library.

Can you try your VM just using the Beez 20 template

Hi, thank you. I've enabled the Beez template and disabled the rokcommon plugin, cleared site and browser caches and the add to cart button is still not working:

http://www.jesseheath-artist.com/paintings/capture/capture-large-detail

Again, this problem just started with the 2.0.20a upgrade.

Also, as a side note, is there any way in this forum to be notified via email that a post has been replied to?

jenkinhill

@perfcomp it worked then stopped? That is the worst sort of thing to work out. Try using Beez20 to strip out possible template issues
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

perfcomp

I messed around with the settings again, doing nothing really different, but it's working again with VMjQuery library selected.  Thanks for your help. 

jenkinhill

Quote from: ironlion37 on March 20, 2013, 22:24:10 PM
Also, as a side note, is there any way in this forum to be notified via email that a post has been replied to?

Profile/Modify profile/notifications
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

ironlion37

#19
Thanks for the tip Kelvin. Back to the main issue (I was the one that started this thread).


QuoteHi, thank you. I've enabled the Beez template and disabled the rokcommon plugin, cleared site and browser caches and the add to cart button is still not working:

http://www.jesseheath-artist.com/paintings/capture/capture-large-detail

Again, this problem just started with the 2.0.20a upgrade.

[Update]
With Beez template enabled, Add to cart is working in Chrome and IE, but not Firefox.
Switched back to RT template, same thing; Add to cart is working in Chrome and IE, but not Firefox. In fact Add to cart takes user to checkout page (odd behavior). I tried restarting firefox with addons disabled. No change.

PRO

Try the  modal pop up add to cart. Turn it on in configuration

madamsplash

Hello - I've had the same issue - but I find if I disable Shop Licious - Virtuemart works fine  (it just looks blerdy awful) ...

hotdiva.com.au  (with Shoplicious)  tigerragfashions.com (disabled)  I've notified Shoplicious and will post if they have an answer.

Ugrade also reverted some of the standard shop images - but can't understand how an upgrade would kill off the html over-ride ...

I've known RS Firewall to reverse upgrades if not deactivated - does nasty things to js ...  but don't think that has happened this time.

Can you tell me what I need to tweak to make it work again ...
http://splash.net.au - Beginners since 1994 - everybody in Virtuemart is a Beginner - unless they sign up as an expert - hey you gonna do that?

madamsplash

Must have been a bug in the upload -

I carefully disconnected all the firewalls and reloaded upgrade 18 then 20b again  (just doing 20b didn't cut it)   - and voila it all works again.

I turned off a few things - e.g. Joomla Plugin - but I don't think this really matters ..

I believe I did not properly disengage the RS Firewall when I did the 18 upgrade ... so there you have it

::)
http://splash.net.au - Beginners since 1994 - everybody in Virtuemart is a Beginner - unless they sign up as an expert - hey you gonna do that?

madamsplash

Nope Scratch that - only reloading  Upgrade18 works - 20b did not take after all ... back to the original problem - no check possible for terms and conditions
http://splash.net.au - Beginners since 1994 - everybody in Virtuemart is a Beginner - unless they sign up as an expert - hey you gonna do that?

PRO

madamsplash
why not just try disbling

views/productdetails/tmpl/default_addtocart.php

.20 added a new feature

quantity steps.

There is a chance that is all it is

PRO

here is the new code for the addtocartform

after this


defined('_JEXEC') or die('Restricted access');

add this

if (isset($this->product->step_order_level))
   $step=$this->product->step_order_level;
else
   $step=1;
if($step==0)
   $step=1;
$alert=JText::sprintf ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED', $step);

BEFORE this

?>


then


after this
   <div class="addtocart-bar">


add this

<script type="text/javascript">
      function check(obj) {
      // use the modulus operator '%' to see if there is a remainder
      remainder=obj.value % <?php echo $step?>;
      quantity=obj.value;
      if (remainder  != 0) {
         alert('<?php echo $alert?>!');
         obj.value = quantity-remainder;
         return false;
         }
      return true;
      }
</script>


Then

this is the new quantity box code

<span class="quantity-box">
      <input type="text" class="quantity-input js-recalculate" name="quantity[]" onblur="check(this);" value="<?php if (isset($this->product->step_order_level) && (int)$this->product->step_order_level > 0) {
         echo $this->product->step_order_level;
      } else if(!empty($this->product->min_order_level)){
         echo $this->product->min_order_level;
      }else {
         echo '1';
      } ?>"/>
       </span>
            <span class="quantity-controls js-recalculate">
      <input type="button" class="quantity-controls quantity-plus"/>
      <input type="button" class="quantity-controls quantity-minus"/>
       </span>
            <?php // Display the quantity box END ?>

MrBim

And another one bites the dust. Same story here, clicking the button to proceed to checkout gives the message that we should accept the TOS first.

I seem to have found a method to get it to work, but it doesn't feel very stable...
- Installed JQuery Easy and enabled the plugin in Joomla Back End (at the choice "enable JQuery" I choose "JQuery", did not change anything else).
- Disabled the Google JQuery at VM Configuration --> Templates --> CSS and Java scripts (left the VM Query enabled)
- Changed whole site to Beez20 template
- Purchased product and was able to proceed to checkout
- Changed whole site back to home made template and was also able to proceed to check out.

The whole JQuery Easy thing did not work before the template switching, but did have effect after the template switching.
- Disabling the JQuery Easy plugin after the template switching sets me back at the start of the story: unable to proceed to checkout because of TOS.

We use Artisteer for our how brew templates.

Can anyone re-produce this method?

PRO

Quote from: MrBim on March 26, 2013, 21:24:33 PM
And another one bites the dust. Same story here, clicking the button to proceed to checkout gives the message that we should accept the TOS first.

I seem to have found a method to get it to work, but it doesn't feel very stable...
- Installed JQuery Easy and enabled the plugin in Joomla Back End (at the choice "enable JQuery" I choose "JQuery", did not change anything else).
- Disabled the Google JQuery at VM Configuration --> Templates --> CSS and Java scripts (left the VM Query enabled)
- Changed whole site to Beez20 template
- Purchased product and was able to proceed to checkout
- Changed whole site back to home made template and was also able to proceed to check out.

The whole JQuery Easy thing did not work before the template switching, but did have effect after the template switching.
- Disabling the JQuery Easy plugin after the template switching sets me back at the start of the story: unable to proceed to checkout because of TOS.

We use Artisteer for our how brew templates.

Can anyone re-produce this method?

you can bypass it


views/user/edit_address.php
after this
<input type="hidden" name="address_type" value="<?php echo $this->address_type; ?>" />
add this


<?php if (JRequest::getVar('addrtype')=='BT')   { echo '<input type="hidden" name="agreed" value="1" />';}?>

ironlion37

Quote from: PRO on March 22, 2013, 02:05:32 AM
Try the  modal pop up add to cart. Turn it on in configuration

It's on. Still can't add to cart in Firefox! This is template independent - happening regardless of template. Really need some help to get this fixed. To state again: just started happening with 2.0.2b upgrade.

AH

Assuming that all of you having this problem, updated in a test server and tested before committing to live.

Of course, unless you knew what changed in the release, it would be difficult to test,
Regards
A

Joomla 3.10.11
php 8.0