News:

Support the VirtueMart project and become a member

Main Menu

Add to Cart Script

Started by dpodesta, November 06, 2011, 09:01:50 AM

Previous topic - Next topic

dpodesta

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

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:

<?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

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?