News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to display product stock level in wholesale shopper group

Started by tassoss, September 01, 2016, 10:08:16 AM

Previous topic - Next topic

tassoss

Hi everyone,

in my eshop I have two shopper groups, one for retail and one for wholesales. How can I display the product stock level only to the wholesale group?

I am using joomla 3.6.2 and virtuemart 3.0.16.

Thank you in advance.

Tasos

GJC Web Design

I guess detect the SG and display if correct in the template

something like

$userModel = VmModel::getModel('user');
   $vmuser = $userModel->getCurrentUser();
   $vmgroup = $vmuser->shopper_groups;

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

tassoss

Thank you for your time and answer.

Unfortunately I am not a php guru and I dont understand GCJ how can this be implemented.

I will wait if anyone else has developed something like that and could help me.

I have searched a lot but I couldn't find an answer.


GJC Web Design

those 3 lines in your details template will give the SG id as an array $vmgroup

you test this array for your chosen SG .. if present show the stock display
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

tassoss

Hi GJC,

could you please tell me the directory of this file in order to try your code?

Thank you very much.

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