Author Topic: Stockhandling on product level Override help needed  (Read 1726 times)

PrPrO

  • Beginner
  • *
  • Posts: 13
Stockhandling on product level Override help needed
« on: September 17, 2019, 17:37:41 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10579
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Stockhandling on product level Override help needed
« Reply #1 on: September 17, 2019, 18:40:39 pm »
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
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10325
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Stockhandling on product level Override help needed
« Reply #2 on: September 18, 2019, 22:49:15 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10579
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Stockhandling on product level Override help needed
« Reply #3 on: September 19, 2019, 17:19:11 pm »
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
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

  • Beginner
  • *
  • Posts: 13
Re: Stockhandling on product level Override help needed
« Reply #4 on: September 21, 2019, 11:11:51 am »
Thank you for your answers and sorry for not repyling earlier.

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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10579
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Stockhandling on product level Override help needed
« Reply #5 on: September 21, 2019, 11:32:48 am »
the answer is above -- 
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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