Recently viewed category specific

  • Posts: 42
  • Thank you received: 0
10 years 2 months ago #207772

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.4

Hi,

I want to display a recently viewed module that it will display products only from the category that the user is currently seeing.

I've created the module and I gave him the following settings(please see screenshot). On some categories it's working correctly but on others it is not.

thanks!

Attachments:
Last edit: 10 years 2 months ago by michaelmyth.

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 2 months ago #207793

Hi,

This looks fine.
Could you provide a link to a page where this doesn't work so that we could look at it ?

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

  • Posts: 42
  • Thank you received: 0
10 years 2 months ago #207878

Hi,

I've sent the link through your contact form and I've posted the link to this topic.

thanks!

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 2 months ago #207879

Hi,

I see what you mean now but that's not how the system works. When you turn on the "recently viewed" option, the system forces the display of the recently viewed items and doesn't take into account the current category.

I've looked at the code and I can propose a change which might make it work like you want it to.
Try to add the line:
$pageInfo->filter->cid = JRequest::getInt("cid",$this->params->get('selectparentlisting'));
after the line:
$force_recently_viewed = true;
in the file components/com_hikashop/views/product/view.html.php and that might do what you want.

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

  • Posts: 42
  • Thank you received: 0
10 years 2 months ago #207982

Hi,

thank you for your help, but unfortunately it doesn't work.

Is there any way I can achieve this?

thanks!

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

  • Posts: 42
  • Thank you received: 0
10 years 1 month ago #210024

Hi,

any news on this one?

thanks!

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 1 month ago #210060

Hi,

Even if you force the "filter->cid" ; the filtering won't be processed because the variable $select will not be empty.
Because that variable is set when the "recently view" is activated

if($force_recently_viewed){
  /*... */
  $select='SELECT DISTINCT b.*';
  /*... */
}
If you let the variable $select empty ; the value of the "filter->cid" (from the Nicolas patch) will be used.

Please note that if you modified a core file ; your modifications will be lost with HikaShop updates.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum