News:

Looking for documentation? Take a look on our wiki

Main Menu

Stockhandling on product level Override help needed

Started by PrPrO, September 17, 2019, 17:37:41 PM

Previous topic - Next topic

PrPrO

Hello,

I am using VirtueMart 3.2.12 on Joomla 3.9.1 and need help with the stockhandling overrides.

I haven't done any overrides yet and would like to hide (Do not Display) a product if its stock is 0, and I would like to do that only for one category, ie. several products - not the whole shop.

Could anyone please help me with the code I should copy to make it work as intended?
And where should the file be uploaded:
templates/my_template/html/com_virtuemart/virtuemart/
templates/my_template/html/com_virtuemart/sublayouts
components/com_virtuemart/views/productdetails/tmpl - some overrides are already stored here

Thank you for your time,
Regards

GJC Web Design

templates/my_template/html/com_virtuemart/sublayouts

adjust products.php or better make a unique e.g. productsnoshow.php and use it in the target category -> Product layout
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

You should just enable "stock on product level" in the main config
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

GJC Web Design

but he only wants this on a certain category as far as I read it..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

PrPrO

Thank you for your answers and sorry for not repyling earlier.

Quote from: GJC Web Design on September 19, 2019, 17:19:11 PM
but he only wants this on a certain category as far as I read it..
Exactly, I only need it for one category.
The problem is I'm not to familiar with Virtuemart and wouldn't want to mess it up, hence I don't know where should I call which code.

Thats why I asked if someone already did something like this and would be willing to share the code for it.

Regards

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation