VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: julianroger on March 20, 2018, 06:34:35 AM

Title: Remove Add to Cart Button
Post by: julianroger on March 20, 2018, 06:34:35 AM
Good Day
Joomla 3.8.5
Virtuemart 3.0.18

I have 3 types of shopper groups:
-default-
Wholesale
-anonymous-

I have deactivated the showing of prices for:
-default-
-anonymous-

I would like to deactivate "add to cart: button for the 2 shopper groups as well

I have seen there is some coding which could be added on other forums, but it did not work for me

Please assist

thank you

Title: Re: Remove Add to Cart Button
Post by: jjk on March 20, 2018, 18:41:14 PM
This is possible if you activate 'Enable shoppergroup specific price display' and 'Show Prices' in the wholesale shopper group settings.

In the 'Product Edit' view first add the price for the wholesale shopper group and select the 'wholesale shopper group'.
Then select 'Add new price' and add 0.00 (including the decimals) in the price field and leave the shopper group field blank (Available for all).

This will hide the price and the 'Add to cart' button for all shopper groups except the wholesale shopper group. Users will see a 'Call for price' button instead. If you like you can add a Joomla language override for 'Call for price' and replace it with some other text.

Another method is to enable 'Only registered users can checkout' in the 'Checkout Settings' and set prices only for the wholesale shopper group with 'Enable shoppergroup specific price display' and 'Show Prices' enabled. (Might be the easier than my description above).
Title: Re: Remove Add to Cart Button
Post by: julianroger on March 21, 2018, 10:55:03 AM
Good Day

Thank you, I have tried both options, but neither seem to work

Option 1 - I can still add to cart either from Main page or product page. I
f I go to checkout, the cart total is just R 0.00

option 2 Wont work either - because it will still show the price per unit

Any other ideas please?

thank you
Title: Re: Remove Add to Cart Button
Post by: jjk on March 21, 2018, 11:54:53 AM
Both cases do work here but I didn't test with 'price per unit'. Maybe you are doing something wrong. Also update to VirtueMart 3.2.12 or 3.2.13 from http://dev.virtuemart.net/projects/virtuemart/files. It doesn't make sense to start a new shop with an old VM version which is 1½ years old.

In the new version, use the 'Category' view instead of the deprecated 'Frontpage' for your home page menu item and configure the setting to display 'Show categories' = Yes in order to 'simulate' the old Frontpage.

Title: Re: Remove Add to Cart Button
Post by: jenkinhill on March 21, 2018, 12:12:10 PM
How are you hiding the proce display for specific shopper groups?

You can hide the add to cart bar by checking the shopper group and displaying accordingly. For some info on how to do this (I have never done it myself) see http://forum.virtuemart.net/index.php?topic=135314.msg471017#msg471017
Title: Re: Remove Add to Cart Button
Post by: julianroger on April 02, 2018, 07:15:07 AM
Thank you
I have managed to sort it all out - quite a process

2 Things follows:

a. When I click on the specific item, the following message is displayed above all other info:
"Message
Attention no standard shopper group set"
Is there any way I can change this message?

b. When I click on call for price button:
The same message is displayed - where can I change it

thank you for your continued help
Title: Re: Remove Add to Cart Button
Post by: jenkinhill on April 02, 2018, 11:56:02 AM
You can override the text string:  http://forum.virtuemart.net/index.php?topic=113895.0

Or create a default (standard) shopper group.