News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Put add to cart botton in browser category in virtuemart 2.0.24b

Started by luiskar, November 23, 2013, 19:14:41 PM

Previous topic - Next topic

luiskar

First of all, sorry because I don't speak English very well.

I migrated joomla 1.5 to joomla 2.5 and virtuemart 1.1.9 to 2.0.24b. After all hours, I finish almost all the work. In joomla 1.5 virtuemart 1.1.9 I had the botton "add to the cart" when I listed de products from a category and also when I entered into de product but now I only have it when I enter into the product. I read that to put the botton I need to write in default.php but I am not so familiar with writting php code yet. Anyone can help me?



janjoomla

file: /com_virtuemart/views/category/tmpl/default.php (better create a override)

After:

<?php // Product Details Button
echo JHTML::link($product->linkJText::_('COM_VIRTUEMART_PRODUCT_DETAILS'), array('title' => $product->product_name,'class' => 'product-details'));
?>

</p>

luiskar

Quote from: janjoomla on November 23, 2013, 23:27:46 PM
file: /com_virtuemart/views/category/tmpl/default.php (better create a override)

After:

<?php // Product Details Button
echo JHTML::link($product->linkJText::_('COM_VIRTUEMART_PRODUCT_DETAILS'), array('title' => $product->product_name,'class' => 'product-details'));
?>

</p>

It works. The problem is that in products that I dont put the price also have the botton, instead the botton request price or question about the product

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

luiskar

Quote from: Maxim Pishnyak on November 24, 2013, 16:31:00 PM
Check related option in VM configuration.
I alredy did that, but only works inside the articule, not in the browser category. There always shows the botton add to the car

luiskar

Anyone knows how to do it, I need if the articule don't have price show the botton request price instead the botton add to the cart. Inside the articule it works but in browser category always shows me add to the cart botton

jenkinhill

There is no code to check for zero price added to the the category template?
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

Spiros Petrakis

Quote from: jenkinhill on November 30, 2013, 12:06:07 PM
There is no code to check for zero price added to the the category template?

The code is already available in the view

$product->prices['salesPrice']<=0

or you can use

!empty($product->prices['salesPrice'])

Joomla templates and extensions development
https://www.yourgeek.gr