Echo Selected Category link inside content module

  • Posts: 129
  • Thank you received: 0
7 years 10 months ago #272703

-- HikaShop version -- : 3.1.1

hi,
i want to echo the link of the category that is selected inside content module at the end of content module file view!
can you guys give me a hint on this ?

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

  • Posts: 83799
  • Thank you received: 13571
  • MODERATOR
7 years 10 months ago #272706

Hi,

I'm not following you.
Could you provide an example with a link to a page, the settings of the module you're talking about and what should be displayed in which case there ?

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

  • Posts: 129
  • Thank you received: 0
7 years 10 months ago #272969

Hi,
I've used HikaShop Content Module to load product from a specific category,
in Module setting I have selected a category,
in front, i want to show a "More Product" link (to that category) below the product that is being generated from that category using the HikaShop content module.

the Purpose is to show users some product of a category in an intro page and let them go to that category page to see more product from below the module using show more product link!

for exapmle i added a HikaShop Content Module in my intro page and configure it to show the latest 5 product of Accessories category and below the product i want to add a "ShowMoreProduct" link to let user go to Accessories Category Page.

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

  • Posts: 83799
  • Thank you received: 13571
  • MODERATOR
7 years 10 months ago #272971

Hi,

The simplest would be to enter the URL that you want to redirect to when you click on the button as "canonical URL" of your category.
The in the file "listing" of the view "product" via the menu Display>Views, you can add such code:

<?php if($this->module){ ?>
<a href="<?php echo hikashop_cleanURL($this->element->category_canonical); ?>"/>Show more products</a>
<?php } ?>

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

Time to create page: 0.058 seconds
Powered by Kunena Forum