-
AuthorPosts
-
calavaro Friend
calavaro
- Join date:
- August 2013
- Posts:
- 125
- Downloads:
- 7
- Uploads:
- 34
- Thanks:
- 28
- Thanked:
- 24 times in 1 posts
September 15, 2013 at 4:12 am #190620Hi,
“Recommend to friend” function is missing from product details view.
I have it enabled in Virtuemart back end, but it does not show on front end at all (no matter what I try).What is the solution to get this to display?
Thank you.
Back end.
Front end.
-
phong nam Friend
phong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
September 17, 2013 at 10:47 am #506080Hi calavaro,
On the JA Hawkstore template, we hide this icon on the product details layout. Anwways, you can display this emai icon by openning templatesja_hawkstorehtmlcom_virtuemartproductdetailsdefault.php file at 248th line, insert these codes:
<?php
// PDF - Print - Email Icon
if (VmConfig::get('show_emailfriend') || VmConfig::get('show_printicon') || VmConfig::get('pdf_button_enable')) {
?>
<div class="icons">
<?php
//$link = (JVM_VERSION===1) ? 'index2.php' : 'index.php';
$link = 'index.php?tmpl=component&option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->virtuemart_product_id;
$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';if (VmConfig::get('pdf_icon', 1) == '1') {
echo $this->linkIcon($link . '&format=pdf', 'COM_VIRTUEMART_PDF', 'pdf_button', 'pdf_button_enable', false);
}
echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon');
echo $this->linkIcon($MailLink, 'COM_VIRTUEMART_EMAIL', 'emailButton', 'show_emailfriend');
?>
<div class="clear"></div>
</div>
<?php } // PDF - Print - Email Icon END
?>
Then create a custom.css file at templates/ja_hawkstore/css/ path and put below codes into:
.icons {
position: absolute;
right: 150px;
top: 490px;
}1 user says Thank You to phong nam for this useful post
calavaro Friendcalavaro
- Join date:
- August 2013
- Posts:
- 125
- Downloads:
- 7
- Uploads:
- 34
- Thanks:
- 28
- Thanked:
- 24 times in 1 posts
September 19, 2013 at 12:58 am #506278Hi,
It worked very well. Thank you very much.
If you have time, not urgent and only for my own knowledge, could you let me know how to turn the icon to a text line?
Alternatively how to change the pop-up text from “Email” to recommend to friend.Edit: Although I had to insert the PHP code at line 70 to get it to show up at the top right, next to the ratings.
Edit2: I also had to add another snippet of CSS to custom.css for it to display right on any device 480px or smaller (eg for modern mobiles with 1080x1920px screens). This code is shown below.
@media (max-width: 480px) {
.icons {
position: absolute;
right: 25px;
top: 530px;
}All the best,
Calavaro
phong nam Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
September 19, 2013 at 10:15 am #506349Hi Calavaro,
In order to change the mail icon into the texts, you will need to customize the VM core file. So that i suggest you to backup and open componentscom_virtuemarthelpersvmview.php, find 37th line:
if ($modal) return '<a class="modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" title="'. JText::_($altText).'" href="'.JRoute::_($link, FALSE).'">'.$text.'</a>';
Change the $text to ‘Recommend friend’.
On the first concern, i missed to give css styles on mobile/tablet view 🙂
1 user says Thank You to phong nam for this useful post
calavaro Friendcalavaro
- Join date:
- August 2013
- Posts:
- 125
- Downloads:
- 7
- Uploads:
- 34
- Thanks:
- 28
- Thanked:
- 24 times in 1 posts
September 19, 2013 at 2:14 pm #506372Hi Leo,
Thanks for replying once again.
You pointed me in the right direction and the right line, however, the correct snippet of code to change was not $text.
The correct snippet was as below"'. JText::_($altText).'"
Changed to "Recommend to friend"
This displays right.All the best,
Calavaro
1 user says Thank You to calavaro for this useful post
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)This topic contains 5 replies, has 2 voices, and was last updated by calavaro 11 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum