Author Topic: button add to cart in the category list  (Read 23634 times)

fanny0

  • Jr. Member
  • **
  • Posts: 91
button add to cart in the category list
« on: November 08, 2016, 17:48:45 pm »
Hi

my site : benisi.cl

I understand that the code that I have to place is this


Quizás quisiste decir: pero no sé dónde debo colocarlo favor darme la ruta
But I do not know where to put it

Please give me the route



I took the code here,
http://forum.virtuemart.net/index.php?topic=90961.0

Code: [Select]
<form method="post" class="product" action="index.php" id="addtocartproduct<?php echo $product->virtuemart_product_id ?>">
<div class="addtocart-bar">
<?php // Display the quantity box ?>
<!-- <label for="quantity<?php echo $this->product->virtuemart_product_id;?>" class="quantity_box"><?php echo JText::_('COM_VIRTUEMART_CART_QUANTITY'); ?>: </label> -->
<span class="quantity-box">
<input style="display:none;" type="text" class="quantity-input" name="quantity[]" value="1" />
</span>

<?php // Display the quantity box END ?>

<?php // Add the button
$button_lbl JText::_('COM_VIRTUEMART_CART_ADD_TO');
$button_cls ''//$button_cls = 'addtocart_button';
if (VmConfig::get('check_stock') == '1' && !$this->product->product_in_stock) {
$button_lbl JText::_('COM_VIRTUEMART_CART_NOTIFY');
$button_cls 'notify-button';
?>


<?php // Display the add to cart button ?>
<span class="addtocart-button">
<input type="submit" name="addtocart"  class="addtocart-button" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
</span>

<div class="clear"></div>
</div>

<?php // Display the add to cart button END ?>
<input type="hidden" class="pname" value="<?php echo $product->product_name ?>">
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="cart" />
<noscript><input type="hidden" name="task" value="add" /></noscript>
<input type="hidden" name="virtuemart_product_id[]" value="<?php echo $product->virtuemart_product_id ?>" />
<?php /** @todo Handle the manufacturer view */ ?>
<input type="hidden" name="virtuemart_manufacturer_id" value="<?php echo $product->virtuemart_manufacturer_id ?>" />
<input type="hidden" name="virtuemart_category_id[]" value="<?php echo $product->virtuemart_category_id ?>" />
</form>

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: button add to cart in the category list
« Reply #1 on: November 08, 2016, 18:35:34 pm »
this is from 2011!!

add to cart butten is a default feature of vm3

take a look to the default virtuemart template or disable your overrides

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10024
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: button add to cart in the category list
« Reply #2 on: November 09, 2016, 22:15:31 pm »
and why we endlessly copy/paste this->  http://forum.virtuemart.net/index.php?topic=79799.0
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

fanny0

  • Jr. Member
  • **
  • Posts: 91
Re: button add to cart in the category list
« Reply #3 on: December 18, 2016, 14:54:35 pm »
sorry

VirtueMart 3.0.18

PHP 5.6


And there is some way to activate or deactivate the add button to the presentation basket of the category

Where, why can not I find it, please

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28013
  • Always on vacation
    • Jenkin Hill Internet
Re: button add to cart in the category list
« Reply #4 on: December 18, 2016, 15:38:12 pm »
Presence or absence of add to cart in the category view is managed by the use of template overrides. Default VM templates include add to cart in categories.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.7 10374 on Joomla 3.9.24 PHP 7.4.12

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10024
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: button add to cart in the category list
« Reply #5 on: December 18, 2016, 16:53:05 pm »
and u don't mention what template u use or a live site url

but in standard VM with std VM template add to cart is on the cat pages
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

fanny0

  • Jr. Member
  • **
  • Posts: 91
Re: button add to cart in the category list
« Reply #6 on: December 19, 2016, 20:07:19 pm »

hi,

The mentioned in the beginning my website is : benisi.cl

and my template is gk_storefront og gavick

Can you tell me how I can add the button to buy please in the category layout in the override of the template

thanks!

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28013
  • Always on vacation
    • Jenkin Hill Internet
Re: button add to cart in the category list
« Reply #7 on: December 19, 2016, 23:01:09 pm »
Ask Gavick to code it for you.    http://forum.virtuemart.net/index.php?topic=108212.0
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.7 10374 on Joomla 3.9.24 PHP 7.4.12