Product category pointing to URL

  • Posts: 72
  • Thank you received: 4
11 years 2 months ago #122442

Hi,

looking forward to find someone who could make out Hika configuration so that it could be possible to choose to make a link from Hika product category to any URL. I mean to be able to redirect to another site by clicking on product category.
The background for such configuration is a wish to display category's products on subdomain page.

Related post:
www.hikashop.com/forum/4-how-to/861399-m...s-hika-business.html

Waiting for any kind of proposal.
Thank you.

-- HikaShop version -- Business
-- Joomla version -- : 2.5

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 2 months ago #122450

Hi,

1. Create a custom category field via the menu Display>Custom fields.
2. In each category enter the link of the category in the custom field.
3. In the file "listing_img_title" of the view "category" (if you're displaying your listing with a div layout and a "image and title" item box layout), that you can edit via the menu Display>Views, just change the line:

<?php $link = $this->getLink($this->row->category_id,$this->row->alias);?>
to:
<?php $link = $this->row->LINK;?>
where LINK is replaced by the column name of your custom field.
4. Enjoy.

Last edit: 11 years 2 months ago by nicolas.

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

  • Posts: 72
  • Thank you received: 4
11 years 2 months ago #122458

thank you very much for really fast response, Nicolas! :)

unfortunately got error message on home page:

Parse error: syntax error, unexpected ')' in /home/........./html/com_hikashop/category/listing_img_title.php on line 10


:(

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

  • Posts: 72
  • Thank you received: 4
11 years 2 months ago #122461

noticed just now that I've posted on wrong topic.
it is supposed to be posted under the topic COMMERCIAL JOBS.

Sorry.

Last edit: 11 years 2 months ago by Batas.

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 2 months ago #122605

I had made a typo in my previous message's code. It's fixed now.

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

  • Posts: 72
  • Thank you received: 4
11 years 2 months ago #122780

Thank you for your efforts, Nicolas!

unfortunately by changing the code in that way I got every category pointing not to my wished URL but to home page... :woohoo:
besides, I tried to change custom field to "text" instead of "link" and nevertheless all categories were just pointing to home page again.

Anyway, I figured out a plan B: to use extension for 301 URL redirection. It seems working.
But still not sure how it affects SEO... :unsure:

Last edit: 11 years 2 months ago by Batas.

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

Time to create page: 0.053 seconds
Powered by Kunena Forum