- Posts: 5
- Thank you received: 0
How to disable a product when it is not for sale?
14 years 2 months ago #57824
by gootty3
How to disable a product when it is not for sale? was created by gootty3
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!
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.
14 years 2 months ago #57834
by Xavier
Replied by Xavier on topic Re: How to disable a product when it is not for sale?
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:
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:
The following user(s) said Thank You: gootty3
Please Log in or Create an account to join the conversation.
14 years 2 months ago #57860
by gootty3
Replied by gootty3 on topic Re: How to disable a product when it is not for sale?
Please Log in or Create an account to join the conversation.
14 years 2 months ago #57911
by Xavier
Replied by Xavier on topic Re: How to disable a product when it is not for sale?
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:
By:
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:
Code:
$query = $select2.' FROM '.$b.$a.$on.' WHERE '.implode(' AND ',$filters).$order;
By:
Code:
$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.237 seconds