custom product using php code

  • Posts: 846
  • Thank you received: 92
8 years 7 months ago #253924

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.1
-- PHP version -- : 5.5.8

Hi
I use a menu item that return a list of products define by listing_img_title.php with div
when i go to the php code to see how is concat the url i have

	<span class="hikashop_product_name">
		<?php if($this->params->get('link_to_product_page',1)){ ?>
			<a href="<?php echo $link;?>">
		<?php }
			echo $this->row->product_name;
		if($this->params->get('link_to_product_page',1)){ ?>
			</a>
		<?php } ?>
	</span>
so the url i click is com_hikashop&ctrl=product&task=show&cid=28&name=xxxxx&Itemid=522&lang=fr
Here i can't configure the option / parameters of the page

In a way if i create a Menu item link to the product using BackEnd GUI i can choose many options/parameters and the link ni the FrontEnd look like
option=com_hikashop&view=product&layout=show&Itemid=523&lang=fr

Is there a way to change the php code to be able to go to a custom product page ?

regard's

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

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
8 years 7 months ago #253933

Hi,

The Itemid parameter contains the id of the target menu item. So if you want to go to a specific menu item with a specific of options, you can change the Itemid to match with the one of the menu item you want.

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

  • Posts: 846
  • Thank you received: 92
8 years 7 months ago #253976

Hi

The itemid here is for testing so i create it manually using the hikashop GUI interface to compare the result of the hikashop team code .
Is there a way to change the code source to have itemid without explicit create it ( use only code php ) ?

Thank's

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

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
8 years 6 months ago #253978

Hi,

I don't understand what you want ? You want to use an item id without creating the menu item corresponding to the id ? That's not possible. It's like trying to use the id of a product without first creating the product.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum