specific product detail in module

  • Posts: 14
  • Thank you received: 0
13 years 1 month ago #32307

Is there a way to load the product detail in a module? I would like to have a specific product and its options to be displayed on my home page.

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

  • Posts: 83156
  • Thank you received: 13430
  • MODERATOR
13 years 1 month ago #32338

You can't load that in a module.
However, you can have a product page on your front end.
For that, just create a menu item of the type hikashop product page via the menu manager of joomla and set that menu as default. Then it will be displayed in the main area of your home page.

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

  • Posts: 14
  • Thank you received: 0
13 years 1 month ago #32347

Thanks Nicolas,
I did, in fact, have the product page linked to my HOME menu item as the default page and was able to build other modules around it nicely. The problem was the page title. Is there a way to override the product title as page title? I would like the product on the home page, but want the page to be titled "... Home Page..." or something similar.

Michael

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

  • Posts: 83156
  • Thank you received: 13430
  • MODERATOR
13 years 1 month ago #32380

Forcing the title can be done with some code in the file "show" of the view "product" via the menu Display->Views, with something like that:

if($this->element->product_id==YYY){
$document =& JFactory::getDocument();
$document->setTitle( 'home page' );
}

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

  • Posts: 14
  • Thank you received: 0
13 years 1 month ago #32391

Thanks again, Nicolas

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

  • Posts: 14
  • Thank you received: 0
13 years 1 month ago #32401

Hi Nicolas -
Just to wrap up the thread.. For whatever reason, the setTitle code you suggested would not work for me. After searching a while I found this variation that does the job:

<?php
if (@$_REQUEST = 'frontpage') {
$document =& JFactory::getDocument();
$document->setTitle("Homepage");
}
?>

Again, Thanks for your help.
M

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

Time to create page: 0.055 seconds
Powered by Kunena Forum