Skip to main content

How to show a Joomla Print/Email icon on Product P

More
13 years 7 months ago #89200 by Duchesne
Hi,

How do you show a Joomla 2.5 Print/Email icon on a Product Page? They show fine on a Joomla Article page but not on the product page.

The product page is in div format.

Thanks in advance for your help.

Regards,

Dennis

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #89377 by Xavier
Hi,

You have to edit the view "product / show_default" to add an email button.
We actually have no options for that.

If I remember well, this question has already been posted on our Forum, try to use the search in the forum to find that post.
You will maybe find how to do that.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #90670 by Duchesne
Hi,

I've extensively searched the forum, Google, bing and can't find how to do as you suggested. Can you show me, please?

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #90810 by Xavier
Hi,

Yes sure. You have to edit the view "product / show_default" and add the code:
Code:
if($tmpl != 'component'){ $popup = hikashop_get('helper.popup'); echo $popup->display( '<span class="icon-32-print" title="'. JText::_('HIKA_PRINT').'"></span>'. JText::_('HIKA_PRINT'), 'HIKA_PRINT', hikashop_completeLink('product&task=show&product_id='.$this->element->product_id,true), 'hikashop_print_cart', 760, 480, '', '', 'link' ); }else{ $js = "window.addEvent('domready', function() {setTimeout(function(){window.focus();window.print();setTimeout(function(){hikashop.closeBox();}, 1000);},1000);});"; $doc = JFactory::getDocument(); $doc->addScriptDeclaration("\n<!--\n".$js."\n//-->\n"); }

In the "if($tmpl != 'component')" you can put all the element not wanted for the print view.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #91080 by Duchesne
Hi Xavier,

Thank you for your effort, but this did not work. Besides, I really would like an Email Icon or Email Text to recommend the item to a fried on the Product Page. Is this possible as it is on a Joomla Article?

Thanks again,

Dennis

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #91332 by Xavier
Hi,

Thanks to try with that code:
Code:
<?php $tmpl = JRequest::getString('tmpl','??'); if($tmpl != 'component'){ $popup = hikashop_get('helper.popup'); echo $popup->display( '<span class="icon-32-print" title="'. JText::_('HIKA_PRINT').'"></span>'. JText::_('HIKA_PRINT'), 'HIKA_PRINT', hikashop_completeLink('product&task=show&product_id='.$this->element->product_id,true), 'hikashop_print_cart', 760, 480, '', '', 'link' ); }else{ ?> <script> window.addEvent('domready', function() {setTimeout(function(){window.focus();window.print();setTimeout(function(){hikashop.closeBox();}, 1000);},1000);}); </script> <?php } ?>
For the email it's a bit more complex.
You have to create a new view to display a contact form to fill the desired email, then on the product page link to this form and give the product id, then on the email form add a button submit, which will call a function to send the email.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #91439 by Duchesne
Thank you, but how do you create a new view for the email function on the Product Page?

Dennis

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #91609 by nicolas
You should use such component to do that:
extensions.joomla.org/extensions/content...rk-a-recommend/13584
Otherwise, it would require to ask a developer to do that project for you as it's really complex if you're not a developer.

Please Log in or Create an account to join the conversation.

Time to create page: 0.223 seconds
Powered by Kunena Forum