Link from an Ad Module to a Product page

  • Posts: 11
  • Thank you received: 0
13 years 3 months ago #5032

I want to link from an Ad module that I created to a product page. To do this, I created a hidden menu and then selected a new menu item that links to the product page that I want to link to from the Ad module. After saving the new menu item, I then copied the menu link, and then pasted this link into the link URL in the Ad module. I have done this when linking one Joomla article to another with great success. However, when I tested the link from my Ad module to the Hikashop product page, I got a fatal error, Fatal error: Call to a member function set() on a non-object/com_hikashop/product/show.php on line 178. I would appreciate your thoughts on this problem.[file path]/com_hikashop/product/show.php on line 178.

I would appreciate your thoughts on this problem.

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
13 years 3 months ago #5041

Hi,

We couldn't find a call to a set function on line 178 of the file show.php which probably means that you use an old version of HikaShop. Could you update to the latest version and try again ?

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

  • Posts: 11
  • Thank you received: 0
13 years 3 months ago #5139

I updated to Hikashop Business, version 1.4.3 and I still get the same error as before:

Fatal error: Call to a member function set() on a non-object in /data/24/2/33/1/2196327/user/2411935/htdocs/joomla1/templates/js_onyx/html/com_hikashop/product/show.php on line 178

I re-pasted the link to the hidden menu for my Hikashop product page.

What should I do next?

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
13 years 3 months ago #5149

Go in the Menu Display->Views and search for the file show of the view product. you will have a button to remove your customization file.
That will allow the system to use the default core file and should fix the problem.

However you will loose the customization you did to the file so you will have to do it again.

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

  • Posts: 11
  • Thank you received: 0
13 years 3 months ago #5177

I removed the file customization as you suggested and re-applied my link. I no longer get the error message, but I now get directed to a blank page. I also tried making a link from an article to the product page and it goes to a blank page. In my browser's address window I see the address for the link that I wanted, but the page is blank.

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
13 years 3 months ago #5178

We need an error message to help you.

Is the page totally blank ? Or do you still see something and just the center area of your template is blank ?

Do you have SEF activated ?

Could you try to activate the joomla debug mode ?

What is the link which displays a blank page ? Could you copy/paste it here ?

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

  • Posts: 11
  • Thank you received: 0
13 years 3 months ago #5185

The link brings up the page template, but the center of the page is blank where the product information should be displayed.

Yes, I have SEF activated as follows:

Search Engine Friendly URLs: Yes
Use Apache mod_write: Yes
Add Suffix to URLs: Yes

I hope this is not a problem because my intention is to have search friendly URLs to improve our site's SEO. In fact, we have purchased a plugin from Artio called JoomSEF that we hope to use to improve our SEO. This plugin is NOT currently enabled.

The link that is displayed is: /joomla1/component/hikashop/product/show.html.

When I add this product page to an existing menu,it works. the page displayed from the link from the existing menu is the same as the link that is displayed from the link from the article page and from the ad module. In either case, the links do not include the product's ID.

I'll report back on the joomla bug mode.

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
13 years 3 months ago #5186

Ok. Now I think I understand the problem:

When you use a menu, the link indeed doesn't contain the product id, but the product id is retrieved from the menu options, so the system is able to display the product.

When you copy/paste that link, if you remove the menu, the product id information linked to that menu is lost and the system isn't able to display any product.
In such cases, it should display an error message. But maybe your template doesn't have the jdoc include tag for messages ? www.hikashop.com/en/support/documentatio...tibility-issues.html

The solution is to keep the menu published where you set your product and to set it to a main menu which is not displayed on your front end.

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

  • Posts: 11
  • Thank you received: 0
13 years 3 months ago #5192

Okay, I followed your instructions and the product page still did not display.

However, I was finally able to solve my problem with the help of the following artice from joomla, "How to Control Module Display When Linking to an Article with no Menu Item". You can find it here: docs.joomla.org/How_to_control_module_di...le_with_no_menu_item

I copied my menu link as before, and pasted it into the link from my module. Then I manually edited the menu link that I pasted and added the following:

&Itemid=200 (200 is the ID of menu item)

The full link thus became: index.php?option=com_hikashop&view=product&layout=show&Itemid=200

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

  • Posts: 11
  • Thank you received: 0
13 years 3 months ago #5219

I also want to thank you for pointing out that the template that I'm using is missing the jdoc include tag for messages. I contacted the company that made my template and they confirmed that they had inadvertently left out the message tag. I edited my template as they instructed, and my message template now works! It now displays error messages as you designed into Hikashop.

Again, thank you!

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

Time to create page: 0.082 seconds
Powered by Kunena Forum