- Posts: 23
- Thank you received: 5
external store quantity override
1 year 8 months ago #365872
by mizso676
external store quantity override was created by mizso676
-- HikaShop version -- : 5.1.0
-- Joomla version -- : 5.2.2
-- PHP version -- : 8.1.28
-- Browser(s) name and version -- : chrome latest, firefox, etc.
Hi guys!
Again, I have a complex question: is it possible to manage external stock? It would be important to be able to order only the existing quantity (e.g. 2pcs), but to show the quantity increased by a value stored in a custom field (e.g. extstore) and the quantity selector also uses this value (e.g. extstore value=4, so the full value is 6pcs)?
This would be important because I can't put what is in external stock into the order, I can only contact the customer via email (e.g. RSForm form).
This way I could manage the order itself (original quantity) and the enquiry (extstock quantity) in one interface.
My question would be how can I override the default quantity handler in hikashop, is there any solution?
Thanks in advance!
-- Joomla version -- : 5.2.2
-- PHP version -- : 8.1.28
-- Browser(s) name and version -- : chrome latest, firefox, etc.
Hi guys!
Again, I have a complex question: is it possible to manage external stock? It would be important to be able to order only the existing quantity (e.g. 2pcs), but to show the quantity increased by a value stored in a custom field (e.g. extstore) and the quantity selector also uses this value (e.g. extstore value=4, so the full value is 6pcs)?
This would be important because I can't put what is in external stock into the order, I can only contact the customer via email (e.g. RSForm form).
This way I could manage the order itself (original quantity) and the enquiry (extstock quantity) in one interface.
My question would be how can I override the default quantity handler in hikashop, is there any solution?
Thanks in advance!
Please Log in or Create an account to join the conversation.
1 year 8 months ago #365873
by nicolas
Replied by nicolas on topic external store quantity override
Hi,
This plugin www.hikashop.com/marketplace/product/109...rder-by-obsidev.html allows you to have a "pre order stock" on top of the default stock for each product.
Once the normal stock reaches 0, the product can still be purchased until the pre order stock reaches 0.
So it seems to match with what you're describing.
This plugin www.hikashop.com/marketplace/product/109...rder-by-obsidev.html allows you to have a "pre order stock" on top of the default stock for each product.
Once the normal stock reaches 0, the product can still be purchased until the pre order stock reaches 0.
So it seems to match with what you're describing.
Please Log in or Create an account to join the conversation.
1 year 8 months ago #365876
by mizso676
Replied by mizso676 on topic external store quantity override
Pre-order is not working well for me because you cannot put the maximum quantity in the cart at once. So you have to consume the default stock first, and then you can only use it afterwards.
Please Log in or Create an account to join the conversation.
1 year 8 months ago #365881
by nicolas
Replied by nicolas on topic external store quantity override
Hi,
Then, you can use a custom product field, and in a plugin, you can implement the onAfterLoadProductPrice event:
www.hikashop.com/support/documentation/6...fterLoadProductPrice
In $element, you have either an object of a product and you can change $element->product_quantity to what you want, or you have an array of product objects and you can loop on the array to change product_quantity on all of them.
Then, you can use a custom product field, and in a plugin, you can implement the onAfterLoadProductPrice event:
www.hikashop.com/support/documentation/6...fterLoadProductPrice
In $element, you have either an object of a product and you can change $element->product_quantity to what you want, or you have an array of product objects and you can loop on the array to change product_quantity on all of them.
The following user(s) said Thank You: mizso676
Please Log in or Create an account to join the conversation.
1 year 8 months ago #365891
by mizso676
Replied by mizso676 on topic external store quantity override
Thanks for your help!
Please Log in or Create an account to join the conversation.
Time to create page: 0.053 seconds