Button 'Add to cart' still displayed when no price

Support desk for Multipurpose Quark Theme
GK User
Tue Aug 29, 2017 8:38 am
Hello,
When there is no price on a Virtuemart's product, the button 'Add to cart' is still displayed below.
Is this a bug? Do you have a solution for this button to disappear?

Best regards.
User avatar
Senior Boarder

teitbite
Wed Aug 30, 2017 1:02 pm
Hi

Please tell me the url to the exact page with an example of this issue.
User avatar
Moderator

GK User
Wed Aug 30, 2017 1:12 pm
User avatar
Senior Boarder

teitbite
Sun Sep 03, 2017 11:28 am
Hi

That's odd. I'm checking the code and appearing of this Add to cart button depends from the price 100%. Please send me an access to ftp to my email [email protected] so I'll check that value is possibg as this price.
User avatar
Moderator

GK User
Wed Sep 06, 2017 1:10 pm
Hello,
I tried adding this code:
Code: Select all
if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and isset($product->images[0]) and !$product->images[0]->file_is_downloadable) return; 

After:
Code: Select all
defined('_JEXEC') or die('Restricted access');
$product = $viewData['product']; 


In \components\com_virtuemart\sublayouts\addtocart.php

But does not work!
User avatar
Senior Boarder

teitbite
Sat Sep 09, 2017 2:46 pm
Hi

Try the same but in template's /html/com_virtuemart/category/default.php

It's an override done from pur template. Or You may try to disable it entirely by renaming this folder /html/com_virtuemart to something else.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.