Figure a simple way to solve the issue of hiding out of stock without doing any modification to the opencart source file. Using a trigger that checks the status of the order, if its status changes to Complete(status_id =5) it disables the product by setting the product status to 0
CREATE TRIGGER `trigger_name` AFTER UPDATE ON `oc_order`
FOR EACH ROW if NEW.order_status_id = 5 then
update oc_product
set status = 0
where product_id = (select product_id from oc_order_product where order_id = NEW.order_id)
and quantity = 0;
end if
Execute this sql statement on the table oc_order and change the name tigger_name to your preferred name.
CREATE TRIGGER `trigger_name` AFTER UPDATE ON `oc_order`
FOR EACH ROW if NEW.order_status_id = 5 then
update oc_product
set status = 0
where product_id = (select product_id from oc_order_product where order_id = NEW.order_id)
and quantity = 0;
end if
Execute this sql statement on the table oc_order and change the name tigger_name to your preferred name.
http://www.opencart.com/index.php?route ... n_id=21241
This is a extension for journal 2 theme , will hide all out of stock product but you can still see the product using their direct link .
tested on journal 2.4.8 on opencart 1.5.5.1 , Test it on other versions and do tell me in comments , so i can tell others
This is a extension for journal 2 theme , will hide all out of stock product but you can still see the product using their direct link .
tested on journal 2.4.8 on opencart 1.5.5.1 , Test it on other versions and do tell me in comments , so i can tell others
This is to hide out of stock products in journal 2 theme , it will work with the super filter module of journal 2 , it will just hide the products , google and other search will be able to see the product using the link , that is good for seo .
Please, backup first!!
It works with the super filter module of journal theme , Custom sections , search , category and manufacturer
Hope it helps you!!
Comments and suggestions are appreciated
tested on journal 2.4.8
http://www.opencart.com/index.php?route ... ournal%202
Please, backup first!!
It works with the super filter module of journal theme , Custom sections , search , category and manufacturer
Hope it helps you!!
Comments and suggestions are appreciated
tested on journal 2.4.8
http://www.opencart.com/index.php?route ... ournal%202
Dirash wrote:Figure a simple way to solve the issue of hiding out of stock without doing any modification to the opencart source file. Using a trigger that checks the status of the order, if its status changes to Complete(status_id =5) it disables the product by setting the product status to 0
CREATE TRIGGER `trigger_name` AFTER UPDATE ON `oc_order`
FOR EACH ROW if NEW.order_status_id = 5 then
update oc_product
set status = 0
where product_id = (select product_id from oc_order_product where order_id = NEW.order_id)
and quantity = 0;
end if
Execute this sql statement on the table oc_order and change the name tigger_name to your preferred name.
You code disable the product , we are talking about hiding it from main website , but you will still be able to see the product if you have a direct product link . My code is not working , have some errors i am working on it , will see if it works or not.
Hi hamza .. u'r link doesnt work. do you have another link or copy module? i need it urgent. thanks
hamza2244 wrote:This is to hide out of stock products in journal 2 theme , it will work with the super filter module of journal 2 , it will just hide the products , google and other search will be able to see the product using the link , that is good for seo .
Please, backup first!!
It works with the super filter module of journal theme , Custom sections , search , category and manufacturer
Hope it helps you!!
Comments and suggestions are appreciated
tested on journal 2.4.8
http://www.opencart.com/index.php?route ... ournal%202
hi hamza thx for share. but your link doesnt work. do you have another link? thank you
hamza2244 wrote:This is to hide out of stock products in journal 2 theme , it will work with the super filter module of journal 2 , it will just hide the products , google and other search will be able to see the product using the link , that is good for seo .
Please, backup first!!
It works with the super filter module of journal theme , Custom sections , search , category and manufacturer
Hope it helps you!!
Comments and suggestions are appreciated
tested on journal 2.4.8
http://www.opencart.com/index.php?route ... ournal%202
I installed plugin (files) at my opencart, but pagination don't show, it hide alone, if I remove plugin (files) worked normally with pagination showing up.
Did somebody can help me ?
Did somebody can help me ?
Hi guys
I recently released an extension which will hide categories with out of stock products as well as empty categories:
http://www.opencart.com/index.php?route ... n_id=24339
The plugin is multi-store enabled, and gives you fine-grained control over exactly how you want it to work. I even got it working with the journal theme.
I suspect it may solve your problem. If you need any further clarification on this please shout.
Rgds
Soteri
I recently released an extension which will hide categories with out of stock products as well as empty categories:
http://www.opencart.com/index.php?route ... n_id=24339
The plugin is multi-store enabled, and gives you fine-grained control over exactly how you want it to work. I even got it working with the journal theme.
I suspect it may solve your problem. If you need any further clarification on this please shout.
Rgds
Soteri
--
Soteri Panagou
Freelance Developer and Opencart Zealot
http://www.opencart.com/index.php?route ... @gmail.com
Hello
InStock Only for all page when show products: category, special, search, manufacturer
https://www.opencart.com/index.php?rout ... n_id=33009
InStock Only for all page when show products: category, special, search, manufacturer
https://www.opencart.com/index.php?rout ... n_id=33009
Opencart Solutions | opencart-solutions.com
Hello
InStock Only for all page when show products: category, special, search, manufacturer
https://www.opencart.com/index.php?rout ... n_id=33009
InStock Only for all page when show products: category, special, search, manufacturer
https://www.opencart.com/index.php?rout ... n_id=33009
Opencart Solutions | opencart-solutions.com
Who is online
Users browsing this forum: Bing [Bot] and 214 guests