VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: rizecorp on September 25, 2013, 06:35:14 AM

Title: terms of service message show show at the cart page
Post by: rizecorp on September 25, 2013, 06:35:14 AM
Hi All,

The message "Please accept the terms of service to confirm" show at the cart page even before We click the check out now button.
http://www.example.com/index.php?option=com_virtuemart&view=cart&Itemid=266

Please let me know how to stop that message before clicking on the "check out now" button

My configuration on checkout tab are below:
One Page Checkout enabled                                   --> No
Show checkout steps                                              --> Yes
Enable Automatic Selected Shipment?                    --> Yes
Enable Automatic Selected Payment?                     --> Yes
Must agree to Terms of Service on EVERY ORDER?  --> No
Show Terms of Service on the cart/checkout?         --> Yes
On checkout, ask for registration                            --> Yes
Only registered users can checkout                        --> Yes

Version Details:
PHP Version: 5.3.23
MySQL ver:   5.5.30
Virtuemart ver: 2.0.22b
Title: Re: terms of service message show show at the cart page
Post by: sohopros on September 26, 2013, 00:55:26 AM
Does someone has some input for this thread.
We need to prevent this message from showing on the Modal System Messages plugin every time open the checkout page.

http://thekrotek.com/index.php?option=com_content&view=article&id=5:modal-system-messages-2-0&catid=2&Itemid=120

Thanks,
SOHO Prospecting Team
Title: Re: terms of service message show show at the cart page
Post by: Maxim Pishnyak on September 26, 2013, 11:14:15 AM
Quote from: rizecorp on September 25, 2013, 06:35:14 AM
The message "Please accept the terms of service to confirm" show at the cart page even before We click the check out now button.
Forum knows how to disable this checkbox at all. Did you look at those threads?
Title: Re: terms of service message show show at the cart page
Post by: sohopros on September 29, 2013, 00:32:21 AM
We have to keep the check box for legal reasons. We just need it to no trigger the message every time we get to the checkout process. For the reasons descried earlier.

Thanks,
SOHO Prospecting Team
Title: Re: terms of service message show show at the cart page
Post by: jenkinhill on September 29, 2013, 10:28:52 AM
You could replace the message text string with a blank space. http://forum.virtuemart.net/index.php?topic=113895.0
Title: Re: terms of service message show show at the cart page
Post by: sohopros on October 02, 2013, 20:02:03 PM
Hi jenkinhill!

Having a blank message is not a solution for us, for legal reasons we need to have the user to accept the terms. What we don't understand is why the message is triggered once we access the cart page. It should only display when pressing the checkout button.

1 - Is there any reason why the message gets triggered once the cart page is access?
2 - How can we prevent from showing when access the cart page and have it display when clicking the checkout button (when applicable)?

Thanks,
SOHO Prospecting Team
Title: Re: terms of service message show show at the cart page
Post by: Maxim Pishnyak on October 03, 2013, 15:04:04 PM
So you need to correct those rows in components\com_virtuemart\helpers\cart.php
with vminfo and COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS
Title: Re: terms of service message show show at the cart page
Post by: sohopros on October 04, 2013, 20:08:58 PM
Is this a known bug then?  Obviously, the message is being triggered at the wrong process point.  The message is only appropriate when the page is submitted without the box being checked.  Is there a prescribed hack to fix this?  We are quite leery of hacking shopping cart software.
Title: Re: terms of service message show show at the cart page
Post by: jenkinhill on October 06, 2013, 18:00:13 PM
I have now had time to try to reproduce this. Using the current version, VM2.0.24 on J2.4.14 with no overrides, the message before the "checkout now" button is " Click here to read terms of service and check the box to accept them" which is correct. Not the message that you describe, "Please accept the terms of service to confirm"
Title: Re: terms of service message show show at the cart page
Post by: sohopros on October 06, 2013, 20:01:19 PM
Maybe we didn't explain the fully.  The problem is not what that message says, it is the fact that VM is sending the message to the queue when the cart page is loaded and it is therefore triggering our modal message window to show it.  The proper timing for a reminder to accept ts and cs is when the user proceeds to the checkout process, if the acceptance box is not already checked.
Title: Re: terms of service message show show at the cart page
Post by: sohopros on October 16, 2013, 18:08:20 PM
Still hoping for help on this:

When a shopper goes to their cart, they see the message: "Please accept the terms of service to confirm."  We don't want this message to be queued unless the shopper clicks Check out now without checking the Terms and Conditions checkbox, which is the proper point in the workflow to queue this message.  How do we fix this?
Title: Re: terms of service message show show at the cart page
Post by: nhinzky on October 31, 2013, 06:28:48 AM
I have the same problem, have you found a solution to this? anyone?
Title: Re: terms of service message show show at the cart page
Post by: sohopros on October 31, 2013, 07:06:31 AM
we can't seem to find anyone that even demonstrates an understanding of the problem, much less offer any help.   :(
Title: Re: terms of service message show show at the cart page
Post by: abc123 on November 21, 2013, 17:32:39 PM
I also have this problem.
The things is when i go to cart it always shows message that i need to accept tos.
This message should only be shown if i checkout my cart and didn't check the tos box, but it shows already when i enter cart.
(http://s12.postimg.org/hcokhnlnt/tos.jpg) (http://postimg.org/image/hcokhnlnt/)

If i don't check tos box and try to checkout the messege is shown twice.
(http://s14.postimg.org/hbckfb771/tos1.jpg) (http://postimg.org/image/hbckfb771/)

So it's not the string it's that it shows when i access cart rather then when i checkout with unchecked tos agreement.

PS. My pictures are in non english (swedish) but the problem is the same.
Title: Re: terms of service message show show at the cart page
Post by: Maxim Pishnyak on November 22, 2013, 09:16:27 AM
Test on standard template and see http://forum.virtuemart.net/index.php?topic=79799
Title: Re: terms of service message show show at the cart page
Post by: Blackwabbit on November 22, 2013, 14:12:42 PM
Hello everyone.
I confirm, i've got the same problem, even if i disable all overrides.
As soon as i load the checkout page, i've got the "please accept our tos" message on top of the page. And when i apply my shipping/payment method, page reloads, and get this message twice on top of the page.
I agree with sohopros, this message should appear only if tos checkbox is unchecked while the final button is pressed. however, it appears as soon as i load cart page.

Our website works on joomla 2.5.16 and virtuemart 2.0.24.
Title: Re: terms of service message show show at the cart page
Post by: christoscologne on November 26, 2013, 09:12:09 AM
Quote from: Blackwabbit on November 22, 2013, 14:12:42 PM
Hello everyone.
I confirm, i've got the same problem, even if i disable all overrides.
As soon as i load the checkout page, i've got the "please accept our tos" message on top of the page. And when i apply my shipping/payment method, page reloads, and get this message twice on top of the page.
I agree with sohopros, this message should appear only if tos checkbox is unchecked while the final button is pressed. however, it appears as soon as i load cart page.

Our website works on joomla 2.5.16 and virtuemart 2.0.24.


I have the same problem. Joomla 2.5.16 and VM 2.0.24b. The TOS system message is showing up in cart page, which is to early. It has to be in end of the checkout process.
How can we disable it just for the cart page?

My site is currenty offline, because it is not ready and therefore not in public.

Is there anybody who found a solution for this. Please post it.
Title: Re: terms of service message show show at the cart page
Post by: sohopros on November 26, 2013, 21:09:33 PM
I don't think anyone has found a solution yet and the moderators seem to have lost interest in this.  The only thing we have been able to do is to have the TOS box checked by default, which is not correct legally, but the only possible path to publishing the site.

Too bad, because it is a forgivable thing to have bugs in software and another thing entirely to ignore them.
Title: Re: terms of service message show show at the cart page
Post by: jenkinhill on November 26, 2013, 23:43:57 PM
I have never seen that issue on any of my VM sites. So have never had to consider it as an issue, and I tried to recreate this tonight but with no success. A bug when present affects a large number of users, if not all, so when present we would see a lot of people reporting the same problem.

This is a peer support forum, where all VM users are invited to support other users. Moderators are here to ensure the forum runs smoothly wherever possible, not to answer all posts, and I would not expect any of them to comment on a problem if they have not themselves experienced (and maybe even solved) it. 
Title: Re: terms of service message show show at the cart page
Post by: christoscologne on November 28, 2013, 11:45:59 AM
Hi Jenkinhill!

It's hard to figure out what can cause this issue and for customers it is confusing to read this message in the cart page, before they actually move to the checkout.
There are in this thread six people with the same issue.

If you was not able to recreate the issue, please just tell us in which files we should take a look and give us a direction/hint please .

How did you try to recreate the issue?
Title: Re: terms of service message show show at the cart page
Post by: Blackwabbit on November 28, 2013, 13:33:51 PM
Hello Jenkinhill,

You can verify this error on the website we're working on :
http://www.louisetfils.fr/en/shop (http://www.louisetfils.fr/en/shop)

This error occurs as much in french than in english:

As soon as you check the cart, a warning appears :
QuotePlease accept the terms of service to confirm
For the records, this is not the dedicaced message you were refering in your first post. This is the actual same message asking to check the TOS box.


Later on, if you forgot to check the TOS box, the message appears twice.
QuotePlease accept the terms of service to confirm
Please accept the terms of service to confirm


If you need further infos and/or access to the website, as for testing purpose, i'm your servitor.

EDIT : I've turned the website online for public use.
Title: Re: terms of service message show show at the cart page
Post by: christoscologne on November 30, 2013, 13:46:11 PM
Any ideas... anybody......?!
Title: Re: terms of service message show show at the cart page
Post by: Maxim Pishnyak on December 01, 2013, 14:11:08 PM
Quote from: jenkinhill on October 06, 2013, 18:00:13 PM
Using the current version, VM2.0.24 on J2.4.14 with no overrides, the message before the "checkout now" button is " Click here to read terms of service and check the box to accept them" which is correct. Not the message that you describe, "Please accept the terms of service to confirm"
Quote from: Maxim Pishnyak on November 22, 2013, 09:16:27 AM
Test on standard template and see http://forum.virtuemart.net/index.php?topic=79799
Quote from: Maxim Pishnyak on October 03, 2013, 15:04:04 PM
So you need to correct those rows in components\com_virtuemart\helpers\cart.php
with vminfo and COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS

I assume that solution seekers can't deal with their template designer AND can't comment mentioned rows in cart.php.

Interesting, why?
Title: Re: terms of service message show show at the cart page
Post by: Blackwabbit on December 02, 2013, 09:43:36 AM
QuoteUsing the current version, VM2.0.24 on J2.4.14 with no overrides, the message before the "checkout now" button is " Click here to read terms of service and check the box to accept them" which is correct. Not the message that you describe, "Please accept the terms of service to confirm"
QuoteTest on standard template and see http://forum.virtuemart.net/index.php?topic=79799

Quote from my own answers:
I confirm, i've got the same problem, even if i disable all overrides.
[...]
Our website works on joomla 2.5.16 and virtuemart 2.0.24.
[...]
You can verify this error on the website we're working on :
http://www.louisetfils.fr/en/shop
[...]
For the records, this is not the dedicaced message you were refering in your first post. This is the actual same message asking to check the TOS box.

QuoteSo you need to correct those rows in components\com_virtuemart\helpers\cart.php
with vminfo and COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS
Maybe we did'nt get that right... it seems that you suggest to completely remove this checkbox and its attached warning sentence? If so we simply can't afford to remove for legal purpose.

Also, COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS is actually the variable we get problems with...



However, are we really only 5 virtuemart users to get this TOS message appear TWICE if TOS check box is unchecked when the confirmation button is clicked?



Thank you.
Title: Re: terms of service message show show at the cart page
Post by: J3DI13 on December 03, 2013, 08:56:42 AM
Hi there

I am having the exact same issue, My client is really annoyed by this and wants it gone and only to appear when/if the buyer hasnt ticked the T&C box.
Anyone had any luck?

I am running J2.5 and VM2.0.24c and don't have any overrides set.

Thanks
Title: Re: terms of service message show show at the cart page
Post by: Blackwabbit on December 03, 2013, 09:11:41 AM
Hello J3DI13.
May you give a link to your website, s asked in the link moderators gave us?
It may help them to realise the issue -if this is actually one, and so help to start to fix it.
Title: Re: terms of service message show show at the cart page
Post by: Milbo on December 03, 2013, 11:22:51 AM
I am sorry guys. I dont get it

I am here now http://louisetfils.fr/en/shop/cart.html, no message. Everything is fine. Hmmm. Strange.
Title: Re: terms of service message show show at the cart page
Post by: Blackwabbit on December 03, 2013, 11:48:50 AM
Hello Milbo, and thank you for your implication in this issue.

To get the issue, you have to be connected. I noticed you haven't created any acount.
So i've made one for you to use at will:

id      : test3
pass : tester




However, please find below two screenshots of the problem :
(http://louisetfils.fr/images/virtuemart-tos-01-on-any-cart.jpg)

(http://louisetfils.fr/images/virtuemart-tos-02-if-tos-is-unchecked.jpg)


Note : the issue is the same with or without overrides.
But however, the only overrides activated by the template is about hide&show shipping/payment methods.
Title: Re: terms of service message show show at the cart page
Post by: J3DI13 on December 04, 2013, 08:53:34 AM
Hi Blackwabbit

The sites shop is only accessible to admins as its not 100% complete. I would be more than willing to send a link and login details to any mod who would
like to view it though. I have had to use a system message plugin that forces the message to fade away 1 second later.

Thanks
Title: Re: terms of service message show show at the cart page
Post by: CasperH on December 08, 2013, 20:09:55 PM
I can confirm I also have this problem, even with the correct settings.

For some reason the accept the TOS message pops up the first time a registered user comes upon the checkout page and every single time there after.

However, I am quite sure it is a change/configuration somewhere, as I have a backupped version from a month or so ago where it is not the case. However, finding the cause has proved difficult.
Title: Re: terms of service message show show at the cart page
Post by: AH on December 08, 2013, 23:20:19 PM
Having problem with 2.0.25e

http://forum.virtuemart.net/index.php?topic=120781.msg412050#msg412050 (http://forum.virtuemart.net/index.php?topic=120781.msg412050#msg412050)

The TOS message fires even though no customer tried to edit an address.
Title: Re: terms of service message show show at the cart page
Post by: CasperH on December 11, 2013, 09:58:39 AM
I found, that if I log in as a regular user instead of an admin, I don't have this message anymore. Has anyone tried that also?

Now, why admin has it, I am puzzled still.
Title: Re: terms of service message show show at the cart page
Post by: Genius WebDesign on March 09, 2014, 23:51:01 PM
Just in case someone still needs to fix this issue, here is how I fixed it:

Modify this file:
/components/com_virtuemart/helpers/cart.php
at line 869 (v. 2.0.26d)

Original code:
if(empty($this->tosAccepted) and !empty($agreed->required) and $validUserDataBT!==-1){
$redirectMsg = null;// JText::_('COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS');
$this->tosAccepted = false;
vmInfo('COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS','COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS');
return $this->redirecter('index.php?option=com_virtuemart&view=cart' , $redirectMsg);
}


Modified code:
if(!empty($agreed->required) and $validUserDataBT!==-1){
$redirectMsg = null;// JText::_('COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS');
$this->tosAccepted = false;
vmInfo('COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS','COM_VIRTUEMART_CART_PLEASE_ACCEPT_TOS');
return $this->redirecter('index.php?option=com_virtuemart&view=cart' , $redirectMsg);
}
Title: Re: terms of service message show show at the cart page
Post by: upedown on March 27, 2014, 10:03:56 AM
nothing happened...
Title: Re: terms of service message show show at the cart page
Post by: byPV on March 28, 2014, 17:48:51 PM
Hi all,

we solved this problem some time ago. Unfortunately there is a bad logic around the TOS. In example, I do not understand why data validation is performed when displaying cart. This should be done only when a customer clicks on Checkout or Confirm button. The message is displayed for that reason.

In version 2.0.26a some changes were made, but the problem can still occur in isolated cases.

This problem can be solved in several ways. One of them is:

Comment the line with the validation cart in the file /components/com_virtuemart/views/cart/view.html.php.

Before version 2.0.26a:


if (!$cart->_redirect and !VmConfig::get('use_as_catalog', 0)) {
  //$cart->checkout(false); // This Line
}


Since version 2.0.26a:


if (!$cart->_inCheckOut and !VmConfig::get('use_as_catalog', 0)) {
  //$cart->checkout(false); // This Line
}


Removing validation should not cause any problems. Validation is also done correctly when Checkout or Confirm button is clicked.

We tested it on version 2.0.22c and 2.0.26d.