Customer Orders Unpublished Product

  • Posts: 242
  • Thank you received: 0
13 years 5 months ago #17955

Hello All,

I'm not sure if this is a bug, but can't explain it as anything else. Here's what happened.

A couple of days ago I copied an existing product and immediately edited that product to set Published=No and changed other product fields, including the product name and code and saved the product. Since that time, the product has never been published. Today, a new customer registered on the site and somehow ordered that "Unpublished" product! How can that happen?

I have searched all over the front end of the site to see if I could find that product and have not been able to find it. I am still using Hikashop Commercial v1.4.8 with Joomla 1.5.23. Has anyone else seen something like this?

Regards,
Ed

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #17958

Unpublished products cannot be displayed on products listings or with their product page.
Does that product have characteristics/variants ?
Could you ask your customer how he found that product ?

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

  • Posts: 242
  • Thank you received: 0
13 years 5 months ago #17992

Good Morning Nicolas,

The product does have one characteristic with two variants and I do intend to ask the customer how he found it, but haven't had a chance to do that yet.

Ed

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #17995

You could try to add the code:
if(!$element->product_published){
return;
}
before the line:
$filters=array('a.product_id ='.$product_id,'a.product_related_type=\'options\'','b.product_published=1');
in the file components/com_hikashop/views/products/view.html.php
Maybe the user tried to get to the product page directly by changing the id in the URL...

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

  • Posts: 242
  • Thank you received: 0
13 years 5 months ago #18019

I tried changing the URL and it just returns the same page I was on. Even pasted the altered URL in a different browser and it returned the same page, which seems strange. I'm at a loss to figure out how they managed to find that product and successfully order it. Hopefully the customer will be able to shed some light.

Ed

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

  • Posts: 242
  • Thank you received: 0
13 years 5 months ago #18027

Correction to my last post:

If you change the cid to the proper number you CAN pull up the unpublished article. I was changing the product name in my first test. A person would just have to guess at what the product id should be, but it does work.

Nicolas, will your patch be included in the next update?

Ed

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #18030

If it works :) I'm waiting for your feedback and we will include it.

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

  • Posts: 242
  • Thank you received: 0
13 years 5 months ago #18033

OK, but it will be later today before I can try it. I'll let you know. I have emailed the customer asking how he did it, but haven't heard back yet.

Ed

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

  • Posts: 242
  • Thank you received: 0
13 years 5 months ago #18037

Had a couple of minutes so I added the patch and it tested good; changing the cid returns a Product Not Found error.

I haven't done any tests other than just changing the id in the URL so don't know if there are any unexpected consequences, but it seems to work.

THANKS!

Ed

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #18038

Great !

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

  • Posts: 392
  • Thank you received: 0
13 years 4 months ago #21696

Hi Guys,

I have the same thing happening where an unpublished product is showing on the front end.

Did you want to have a look Nicolas, or should I just delete the product as they are sold out?

Cheers :)

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 4 months ago #21714

That issue is corrected in 1.5.2

Unpublished products can't be displayed by users anymore.

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

  • Posts: 392
  • Thank you received: 0
13 years 4 months ago #21715

Oh ok, I upgraded just a wee while ago to 1.5.23 It must have carried over. I will just delete it :)

Thanks Nicolas :)

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

Time to create page: 0.069 seconds
Powered by Kunena Forum