VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: spacialek on December 30, 2011, 23:50:47 pm

Title: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: spacialek on December 30, 2011, 23:50:47 pm
I don't need (and don't want) to have the Terms of Service displayed anywhere in my store, so I disabled the function, but it keep showing in the cart and user info form, and cannot checkout until I check it

Tried it on a Joomla 1.5 + VM 2.0 clean version.



[attachment cleanup by admin]
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: Milbo on December 31, 2011, 14:03:09 pm
The option must agree on every order is meant for countries like France, where it is not allowed to use an already given agreement.

Just disable the agree field in the shopperfields and remove with templating the TOS checkbox. This should work already.
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: spacialek on December 31, 2011, 19:42:45 pm
I use the cart as a way for the customer to request a quote with selected products (an later on will use it as a real shopping cart), so I don't think the TOS is required for the moment, and have nothing to write inside!
I tried disabling it in the shopper fields, but it's locked, how do I unlock it?
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: spacialek on December 31, 2011, 20:19:44 pm
I found a way to unlock the shopper fields, without having to hack the core system, but it's unlocking all the core fields.
I have made an administrator template override of the userfields/default.php file. And commented out the following line:
Quote
//$coreField = (in_array($row->name, $this->lists['coreFields']));

How can I just remove the 'agreed' value from the array instead of commenting out every fields?

Thanks!
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: design609 on January 28, 2012, 17:06:01 pm
What I did...
following you great idea about doing a template override:
Was just to turn of what I needed on the shopperfield "Agreed"
(after the template override of /administrator/templates/khepri/html/com_virtuemart/userfields/default.php)

When finished doing my setting (which I only could from the list of shopperfields clicking the icons - not from inside the field itself)
I just reverted the override file again - then the core fields again was locked and my "agreed" field kept its settings.

* Anyway I still think this "Agreed" field should not be in the core fields - It must be up to the shop owners to check their legal of their country/state and make their setting accordingly instead other shipowners are forced to have this present on checkout
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: Milbo on January 29, 2012, 02:16:56 am
I do not understand this, because afaik you can edit the customfields, just not in the list.
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: coin on January 29, 2012, 11:47:53 am
Milbo, please could you explain how to edit locked userfileds. Even when I go to the edit page from the list, I cannot disabled it because radiobuttons for it are readonly.
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: Milbo on January 29, 2012, 15:59:46 pm
ahhh, there is it. Yes but in fact I should add a nice option. The agreed field is a bit more tricky then the others. Because we handle it two times. But we cant change it atm. But for the while.

Take a look on the FE/helpers/cart.php and search there for tosAccepted. Set this field in the constructor to 1. and in the function checkoutData change line 748
Code: [Select]
$this->tosAccepted = JRequest::getInt('tosAccepted', $this->tosAccepted); to
Code: [Select]
$this->tosAccepted = 1;
Use in your db the adjusted line
Code: [Select]
UPDATE `jos_virtuemart_userfields` SET `required`=0, `account`=0 WHERE `virtuemart_userfield_id`=4 LIMIT 1;
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: design609 on January 31, 2012, 11:02:52 am
@Coin
look at the solution of spacialek's post
Much easier - and you can edit it from the overview list of all fields (with the checkmarks) just not from within the field screen for only "Agreed" with radiobuttons.

Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: rustle on February 09, 2012, 16:47:41 pm
Milbo's solution work perfectly

I highly recommend  :D
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: nflmerch on February 10, 2012, 01:00:21 am
Yup, Milbo's awesome.
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: slutsker on April 03, 2012, 10:46:01 am
but what will happen after update to new version ?
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: Jason Farmer on August 30, 2012, 14:02:01 pm
What I did...
following you great idea about doing a template override:
Was just to turn of what I needed on the shopperfield "Agreed"
(after the template override of /administrator/templates/khepri/html/com_virtuemart/userfields/default.php)

When finished doing my setting (which I only could from the list of shopperfields clicking the icons - not from inside the field itself)

I just reverted the override file again - then the core fields again was locked and my "agreed" field kept its settings.

* Anyway I still think this "Agreed" field should not be in the core fields - It must be up to the shop owners to check their legal of their country/state and make their setting accordingly instead other shipowners are forced to have this present on checkout

This still isn't working in 2.0.10

great tip - and it also meant that I found out how powerful template overrides can be...

rather than commenting out the line I just added a checkbox to the core fields ...
replacing
Code: [Select]
$checked = ($coreField) ?
'<span class="hasTip" title="'. JText::_('COM_VIRTUEMART_FIELDMANAGER_COREFIELD').'">'. $image .'</span>' :
JHTML::_('grid.id', $i, $row->virtuemart_userfield_id);

with
         
Code: [Select]
$checked = ($coreField) ?
'<span class="hasTip" title="'. JText::_('COM_VIRTUEMART_FIELDMANAGER_COREFIELD').'">'. $image .'</span>'.JHTML::_('grid.id', $i, $row->virtuemart_userfield_id) :
JHTML::_('grid.id', $i, $row->virtuemart_userfield_id);

changing and saving a new order then works ... fantastic ... changing it in each individual edit screen for each field was just not an option for me... too many fields that are all over the shop (sic)

Also saw a nice sql tip about renumbering items in the list (http://www.paulwhippconsulting.com.au/webdevelopment/31-renumbering-an-qorderingq-field-in-mysql)
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: guimplenchik on December 13, 2012, 17:24:43 pm
Still the ToS field couldn't be modified... any plans to fix this? (VM 2.0.14)
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: rzrz on January 30, 2013, 13:29:36 pm
Still the ToS field couldn't be modified... any plans to fix this? (VM 2.0.14)

ditto
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: marklandry on April 24, 2013, 08:07:47 am
same here...
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: jenkinhill on April 24, 2013, 10:30:53 am
same here...

What is?
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: marklandry on April 26, 2013, 16:21:47 pm
Still the ToS field couldn't be modified... any plans to fix this? (VM 2.0.14)

I'm on 2.0.20 and same prob.  This issue is over a year old and should require a template override.  If enabling/disabling a feature is offered as part of the config params, it should work without any code adjustments.



Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: jenkinhill on April 26, 2013, 16:37:18 pm
TOS is a protected Joomla field so must be unlocked for making changes to required etc - to unlock thye field see http://forum.virtuemart.net/index.php?topic=112563.msg378680#msg378680
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: amorino on May 03, 2013, 06:12:51 am
Hello,
I have the same problem 2.0.18a

why should we make changes on core files ? after upgrade all that changes will go away

I simply don't want users to check the TOS but I still have a little checkbox behind the command button on the cart

How to disable that please?

Best regards
amorino
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: jenkinhill on May 03, 2013, 10:42:34 am
You don't need to change core files - you are just doing some configuration changes. Use css to hide the checkbox in this version, add to your Joomla template css or custom css file depending on your site.

#tosAccepted {display:none;}
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: amorino on May 03, 2013, 15:43:13 pm
Hello,
if I hide it the command doesn't pass because it asks to check it
I tried this in the cart template

echo "<div style=\"display:none;\">   ";
               //echo VmHtml::checkbox ('tosAccepted', $this->cart->tosAccepted, 1, 0, 'class="terms-of-service"');
               echo VmHtml::checkbox ('tosAccepted', $this->cart->tosAccepted, 1, 1, 'class="terms-of-service"');
echo "</div>";


And it works ;)
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: Stonedfury on May 08, 2013, 21:48:15 pm
I opened MySQL and just made all the TOS settings to 0 so now I don't seem to have an issue. I replaced with a text box that claims "By confirming your purchase you agree to our "link" to shipping and returns. It's much easier than a check box and no excuse as it is in there face. :) Unless they are illiterate. :(
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: isabeaux on May 08, 2013, 23:04:06 pm
After the last update (or about) my shop stopped working for users that were not signed in (all browsers) BIG PROBLEM!
When clicking on "Check out" it would not let them go further without agreeing on the TOS but would not show the option to check the box. It worked fine for registered users.
My solution was (as described above - but probably not recommended) to disable the requirement of the TOS via the database (since the record is locked).
This seems to be working for now, but it's not ideal.
Maybe a fix in the next update?
Thanks
Tomás

VM 2.0.20b
VM Theme Shoplicious
Joomla! 2.5.11

PHP Built On    Linux localhost 3.2.0-38-virtual #61-Ubuntu SMP Tue Feb 19 12:37:47 UTC 2013 x86_64
Database Version    5.5.31-0ubuntu0.12.04.1-log
Database Collation    utf8_general_ci
PHP Version    5.3.10-1ubuntu3.6
Web Server    Apache
WebServer to PHP Interface    apache2handler
Joomla! Version    Joomla! 2.5.11 Stable [ Ember ] 26-April-2013 14:00 GMT
Joomla! Platform Version    Joomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT
User Agent    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31

Using Gantry Rocket theme Clarion
Not using K2
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: Stonedfury on May 10, 2013, 17:55:59 pm
I did my database tweek a few updates back and vm update didn't overwrite it. YAY!! Maybe they could just give us the access through admin to make it how, we the users, want it to be.
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: LTCreations on December 20, 2013, 09:15:17 am
Stonedfury - would you mind providing a little more detail on the changes you made to you database? I've just gone through everything I could find in the forums, even used the zip file with the "default.php" from jenkinhill.
Although I can get the checkbox hidden, and everything set up so there is no visual reference to TOS, when I click on "Checkout" (using the 1-page checkout), the error message at the top of the page keeps saying that I need to agree to the TOS.
Actually I get the message after adding something to the cart and inputting my name and address information. I go to the next step and see the message, "Please accept the terms of service to confirm".

In the VM settings, everything is de-selected in the templates, and the "agreed" settings are "ALL" disabled.
I've even gone into the db and verified that everything is "0"....but the message saying I need to agree still appears at the top.

I'm baffled...
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: Milbo on December 20, 2013, 10:40:10 am
The problem still exists in vm2.0.26a?
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: marsipulami on January 26, 2014, 03:08:19 am
I've got Virtuemart Version 2.0.26d / Jommla 2.5.17 and still the same problem!
How can i disable the agree to the terms function?

My problem is still bigger now.
Equal on what i set in the shop configuration (must agree or not / Backend) it won't let me checkout in the frontend.
I've checked the box (agree to the terms..) in the checkoutprocess, but i get everytime the info, that i have to accept the terms of service.

Anyone a idea?

Thanks
Marsipulami

[attachment cleanup by admin]
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: marsipulami on January 31, 2014, 14:16:10 pm
No help?
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: jenkinhill on January 31, 2014, 15:36:16 pm
Maybe http://forum.virtuemart.net/index.php?topic=121463.msg414543#msg414543
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: Milbo on January 31, 2014, 21:14:53 pm
go to the agreed field and set as the default just a 1.
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: frometa on February 01, 2014, 04:54:29 am
I also need help with this.

I want to disable the Term of Service check Box.

I'm using VirtueMart latest version with Joomla 2.5.17

I need clear direction to get this fix.

"Where can I find the field to add the #1 ?
Title: Re: Disabling "Must agree to Terms of Service on EVERY ORDER?" doesn't work
Post by: Milbo on February 01, 2014, 11:19:56 am
BE shopperfields, field "agreed"