Skip to Content

New J2Commerce 6.6.5 is out. Here is everything in the release.

See What’s New
Account
Enter the email address on your account.
Forgot your username?
Enter your password.
Forgot your password?

Or continue with

Closed Public Category: Technical Support / Bugs Ticket #205

Cross Sells loads inactive / trashed articles

This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Conversation

Terry Harker

Using the cross sale products in the latest J2commerce version (4.0.12), I realised that all products are loaded regardless of their state. I found out that in $cross_sell_product->source, I can find all article information, so I found a workaround for this for the moment, but I think it's a bug.

Here is my workaround: in the template, in view_crossells.php, find this line:

foreach($this->cross_sells as $cross_sell_product):

and add the following inside the loop:

if($cross_sell_product->source->state !==1) continue;

 

 

Adam Melcher Staff

Terry,

 

Thanks for the great feedback, I have already updated the product helper file to ensure the product's article is also published (not sure why it wasn't already checked in the past) which means you shouldn't need to use your additional check in the override once 4.0.13 is released.

 

Adam