Author Topic: Add to Cart Script  (Read 3687 times)

dpodesta

  • Beginner
  • *
  • Posts: 12
Add to Cart Script
« on: November 06, 2011, 09:01:50 am »
Hi

Can anyone help me out with some script that I can use to place an add to cart button in an article?  Using VM2.0.0-RC-2k  joomla 1.7.

I have a table of thumbs and I need to add an "add to cart button for each" .

This is instead of using a category view.

Reason being is that I also need to add pop ups to the thumb images so that the details pop up instead of going to details page.

I can't do this in virtuemart but can do it in an article.

Any help is much appreciated.

aussiejosh

  • Beginner
  • *
  • Posts: 6
Re: Add to Cart Script
« Reply #1 on: November 10, 2011, 06:59:40 am »
I am not quite sure you can do this without looking for a joomla plugin that would do this?

I have been able to create 'add to cart' links within the VM store using the following code in my category view:

Code: [Select]
<?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::_('Add to Cart');
$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 ?>" />

Let me know how you go finding a plugin that will do this!

dpodesta

  • Beginner
  • *
  • Posts: 12
Re: Add to Cart Script
« Reply #2 on: November 10, 2011, 12:21:57 pm »
Thanks for that.

I need some script to add in jce editor that will place a button in my article, I understand that I would need to identify the product id manually.

Do you know how I can do that?