- Posts: 28
- Thank you received: 1
Category Names added to Products pages
Im sure I had this figured out before, but seem to lost where to add this.
I would like to have the Category names automatically added to each Product page so customers can see that they are in a "certain category of products". (Enclosed: a sample of what im talking about)
Example: when customer clicks on "amino acids category" ... all amino acids products apear under the heading "Amino Acids".
Thanks again guyz... appreciate your time and work..!
Also, awaiting 1.6.0 and the "badges" to come around. section for hikashop!......hikashop is amazing.. !!
Big5hot www.tsn.sportsnutrition.com
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
I think that you'll have to :
- Go to "Hikashop->Display->Views"
- Edit the "listing_img_title" file of the "product view" of the front-end's template that you are currently using
- Add this code :
Please Log in or Create an account to join the conversation.
Is there a specific place/position i should insert this "code" ?. I am not very knowledgeable when it comes to code. I found the file and inserted it, but nothing happened.
Need a little more help with this one....THanks!
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Sorry I misunderstood your question you should :
- Go to "Hikashop->Display->Views"
- Edit the "show_default" file of the "product" view of the front-end's template that you are currently using
- Add this code :
Please Log in or Create an account to join the conversation.
THanks for your help but im still not able to achieve my goal. Maybe I have not explained clear enough, and im sorry for that.
There are 3 pages, (1)category (2)products in category (3)products that are highlighted
I would like to display a category text in the "(2)products in category" page and not in (3).
I added the code that you gave me and it added a category text in #(3). - See Attached pics
www.tsnsportsnutrition.com
I really appreciate you taking the time in helping me. Sorry if I was not clear...
Big5hot
_______________
UPDATE:
Hi Mohamed..
After playing with the many controls, I may have stumbled on the SOLUTION. I Hide the Menu and the category title for each category appeared. Im not sure if that was the reason, but as you can see, the issue is resolved.
THANKS = Mohamed for your time and efforts... again. (PROBLEM SOLVED,)
Big5hot
Please Log in or Create an account to join the conversation.
I used this code to display category on product page, but I would like to display parent category/s too. Trying to figure it out I could use some help :blush:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Undefined variable: category_id in C:\xampp\htdocs\...
Please Log in or Create an account to join the conversation.
The code I gave will display the name of all the parents of the category with its id set in the $category_id. If you don't set any $category_id before that code with the id of the category for which you want to display the parents, it won't be able to work properly.
For example, you can add your code inside the categories foreach like this
foreach($this->categories as $category){
$category_id = $category->category_id;
//code from my previous message
}
Please understand that the support we provide here is about the use of HikaShop, not to code for you your customizations, although we try to help when it's not too complex. I would recommend to look for a developer to help you if you're not a developer and that you want to add advanced code modifications like these.
Please Log in or Create an account to join the conversation.
thanks your time
Please Log in or Create an account to join the conversation.
Mohamed Thelji wrote: Hi,
Sorry I misunderstood your question you should :
- Go to "Hikashop->Display->Views"
- Edit the "show_default" file of the "product" view of the front-end's template that you are currently using
- Add this code :afterCode:<?php foreach($this->categories as $category){ echo ($category->category_name).' - '; } ?>Hope this will help you.Code:<div id="hikashop_product_top_part" class="hikashop_product_top_part">
Please Log in or Create an account to join the conversation.
change the code:
to:
Please Log in or Create an account to join the conversation.
I have a site with sports teams listed, each team has a sub-category of the main category 'clubshops' and I would like to display this above the product name so that people can flick back to the teams main category view.
I have tried this...
Please Log in or Create an account to join the conversation.
That code should still work fine.
Could you give a link to the page where you have that ?
Please Log in or Create an account to join the conversation.
Truly bizarre, just added the same code I had tried (and pasted here) back into the page, and this time I get a Link???
Sample URL to product page: /teamshop/llansawel/product/396-training-vest
I have added code to templates/gk_storefront/html/product/show_tabular.php
However the link created goes to: /teamshop/llansawel/team/27-llansawel-rfc
And I would like it to go to: /teamshop/llansawel/
Is there anyway to change this, other than editing .htaccess to redirect?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.