cms-code-in-virtuemart

Fabiano
16 Posts
Fabiano posted this 23 November 2017

I would like to insert in the template the virtuemart button of function mailRecommend?

I would like to insert in the template the virtuemart button of function mailRecommend?
Vote to pay developers attention to this features or issue.
4 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 23 November 2017

Hi,

Is it built-in VM functionality?
If not but you have php code for button you can add it into the CMS Code control which is available under the Insert tab >> More.

Thank you,
Olivia

Hi, Is it built-in VM functionality? If not but you have php code for button you can add it into the CMS Code control which is available under the Insert tab >> More. Thank you, Olivia
Fabiano
16 Posts
Fabiano posted this 23 November 2017

is an option attached to virtuemart to insert mailRecomendar, wanted to know which is php cod to insert in the cms-code of themler

is an option attached to virtuemart to insert mailRecomendar, wanted to know which is php cod to insert in the cms-code of themler
Fabiano
16 Posts
Fabiano posted this 24 November 2017

Getting the I wanted the code is the one below:

    $link = 'index.php?tmpl=component&option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->virtuemart_product_id;

    echo $this->linkIcon($link . '&format=pdf', 'COM_VIRTUEMART_PDF', 'pdf_button', 'pdf_icon', false);
    //echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon');
    echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon',false,true,false,'class="printModal"');
    $MailLink = 'index.php?option=com_virtuemart&view=productdetails&task=recommend&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&virtuemart_category_id=' . $this->product->virtuemart_category_id . '&tmpl=component';
    echo $this->linkIcon($MailLink, 'COM_VIRTUEMART_EMAIL', 'emailButton', 'show_emailfriend', false,true,false,'class="recommened-to-friend"');

Getting the I wanted the code is the one below: $link = 'index.php?tmpl=component&option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->virtuemart_product_id; echo $this->linkIcon($link . '&format=pdf', 'COM_VIRTUEMART_PDF', 'pdf_button', 'pdf_icon', false); //echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon'); echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon',false,true,false,'class="printModal"'); $MailLink = 'index.php?option=com_virtuemart&view=productdetails&task=recommend&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&virtuemart_category_id=' . $this->product->virtuemart_category_id . '&tmpl=component'; echo $this->linkIcon($MailLink, 'COM_VIRTUEMART_EMAIL', 'emailButton', 'show_emailfriend', false,true,false,'class="recommened-to-friend"');

Last edited 24 November 2017 by Fabiano

Support Team
Support Team posted this 25 November 2017

Hi,

Simply insert the CMS Code intol into the Product Details control to the place where you wan to display the links and add the code you provided into the CMS Code control. But you will need to wrap the code into PHP tags:
<?php
[code]
?>

If the appropriate options (print/email) are enabled under the VM settings you will see the links.

Thank you,
Olivia

Hi, Simply insert the CMS Code intol into the Product Details control to the place where you wan to display the links and add the code you provided into the CMS Code control. But you will need to wrap the code into PHP tags: `<?php` [code] `?>` If the appropriate options (print/email) are enabled under the VM settings you will see the links. Thank you, Olivia
You must log in or register to leave comments