- Posts: 42
- Thank you received: 0
Recently viewed category specific
- michaelmyth
-
Topic Author
- Offline
Less
More
11 years 2 months ago - 11 years 2 months ago #207772
by michaelmyth
Recently viewed category specific was created by michaelmyth
-- 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!
-- 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!
Last edit: 11 years 2 months ago by michaelmyth.
Please Log in or Create an account to join the conversation.
11 years 2 months ago #207793
by nicolas
Replied by nicolas on topic Recently viewed category specific
Hi,
This looks fine.
Could you provide a link to a page where this doesn't work so that we could look at it ?
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.
- michaelmyth
-
Topic Author
- Offline
Less
More
- Posts: 42
- Thank you received: 0
11 years 2 months ago #207878
by michaelmyth
Replied by michaelmyth on topic Recently viewed category specific
Hi,
I've sent the link through your contact form and I've posted the link to this topic.
thanks!
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.
11 years 2 months ago #207879
by nicolas
Replied by nicolas on topic Recently viewed category specific
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.
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.
- michaelmyth
-
Topic Author
- Offline
Less
More
- Posts: 42
- Thank you received: 0
11 years 2 months ago #207982
by michaelmyth
Replied by michaelmyth on topic Recently viewed category specific
Hi,
thank you for your help, but unfortunately it doesn't work.
Is there any way I can achieve this?
thanks!
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.
- michaelmyth
-
Topic Author
- Offline
Less
More
- Posts: 42
- Thank you received: 0
11 years 2 months ago #210024
by michaelmyth
Replied by michaelmyth on topic Recently viewed category specific
Hi,
any news on this one?
thanks!
any news on this one?
thanks!
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210060
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Recently viewed category specific
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 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,
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
Code:
if($force_recently_viewed){
/*... */
$select='SELECT DISTINCT b.*';
/*... */
}
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.
Please Log in or Create an account to join the conversation.
Time to create page: 0.195 seconds