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

Suggestion: new functionality to hide shopper fields

Started by PeterSwe, March 23, 2015, 19:39:56 PM

Previous topic - Next topic

PeterSwe

Hi,
Sometimes you want to add a shopper field which only admin are allowed to change or see. Today you can hide the field for account maintenance but this also hide it for the admin.
Perhaps something to add for future versions?

In the meantime I would be very glad to get some advice where I can hide these fields in the "Shopper account" and in the BT and ST addresses. Right now I have 6 customer unique fields before the shipmentaddress in the cart.

Thanks,
Peter

GJC Web Design

the fields are displayed in a loop on (over ride path) html\com_virtuemart\user\edit_address_userfields.php

you could hide them by css ..



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

PeterSwe

Thanks for your answer. I have migrated the shop from 1.1 to 3.0 and in 1.1 I just coded $skipFields[] = [userfield]; in ps_shopper.php and in account.billing.tpl.php I did an array for the fields to skip.
I was thinking doing it in a similar way for these 6 customfiled_id's which I don't want to show. I just don't know where to take care of it.

//Peter

GJC Web Design

if you don't mind core hacks

components\com_virtuemart\views\cart\view.html.php ~ line 107

$userFieldsCart = $userFieldsModel->getUserFields(
            'cart'
            , array('captcha' => true, 'delimiters' => true) // Ignore these types
            , array('delimiter_userinfo','user_is_vendor' ,'username','password', 'password2', 'agreed', 'address_type') // Skips
         );
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

PeterSwe

Thanks,
I don't like core hacks but sometimes it's a quick workaround. :)

PeterSwe

Strange, it didn't work for the cart. Only for the order.