How to disable a product when it is not for sale?

  • Posts: 5
  • Thank you received: 0
12 years 4 months ago #57824

Hi all!:)
Im new here.
now my question:

how I can disable automatically when a product is not for sale more?

i need modify the php code no? but i dont get it.. so if someone can help me..I would be grateful!
Bye! and Thanks!

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

  • Posts: 13201
  • Thank you received: 2322
12 years 4 months ago #57834

Hi gootty3,

To automatically disable a product not for sale anymore, simply go in HikaShop > Configuration > Display, and under the "Default parameters for products" tab, check no for the option: "Display out of stock products".

You can too disable produts manually in HikaShop > Products, and unpublish the product by clicking on the published icon:

Attachments:
The following user(s) said Thank You: gootty3

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

  • Posts: 5
  • Thank you received: 0
12 years 4 months ago #57860

hi!
thanks for your quick answer!
But i need it with de "end date" of the product.



you know?
any idea?

Thanks again!

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
12 years 4 months ago #57911

Hi,

You can do it by editing the SQL request in the file: YourSite/components/com_hikashop/views/product/view.html.php
In the listing function replace the line:

$query = $select2.' FROM '.$b.$a.$on.' WHERE '.implode(' AND ',$filters).$order;

By:
$query = $select2.' FROM '.$b.$a.$on.' WHERE '.implode(' AND ',$filters).' AND (b.product_sale_end = 0 OR b.product_sale_end > '.time().') '.$order;

The following user(s) said Thank You: gootty3

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

Time to create page: 0.084 seconds
Powered by Kunena Forum