News:

Support the VirtueMart project and become a member

Main Menu

"One-time" user field - or another solution?

Started by David, March 29, 2017, 23:27:23 PM

Previous topic - Next topic

David

Upon registration, I wish to let the shopper to send me information if it is a non-profit, education, government or similar organization (to apply discounts on some products).
I have not found an elegant way how to do it.
I have created a custom field "Orgtype" (type "select") allowing the registering shopper to choose its type of organization. Then I will personally judge whether the shopper has set the correct type and set discounts accordingly (or set Orgtype back to normal shopper in the shopper's account). Since this moment, it would be nice to have Orgtype read only for the shopper - but it is not possible; the shopper can freely mess with the field at any time, which can be confusing.

Can someone advice a way how to do it better?
Joomla 3.8.3, VirtueMart 3.4.2

seyi

Seyi A
--------------------
Promotion enhancement for Virtuemart:
   - AwoCoupon FREE - http://www.awocoupon.com/starter
   - AwoCoupon Pro - http://awodev.com/products/joomla/awocoupon
   - AwoRewards - http://awodev.com/products/joomla/aworewards
   - AwoAffiliate - http://awodev.com/products/joomla/awoaffiliate

David

Quote from: seyi on March 31, 2017, 00:50:44 AM
Setting shopper groups?  If so an extension like this might help:
https://extensions.joomla.org/extension/bit-change-shopper-group-for-virtuemart/
Interesting plugin, but I don't need to assign shopper groups automatically.
Joomla 3.8.3, VirtueMart 3.4.2

seyi

I believe there is the option to manually select at registration.  In any case, if it might work, does not hurt to email the developer to see.
Seyi A
--------------------
Promotion enhancement for Virtuemart:
   - AwoCoupon FREE - http://www.awocoupon.com/starter
   - AwoCoupon Pro - http://awodev.com/products/joomla/awocoupon
   - AwoRewards - http://awodev.com/products/joomla/aworewards
   - AwoAffiliate - http://awodev.com/products/joomla/awoaffiliate

GJC Web Design

re the shopper field

in the user account frontend either don't show it or disable it if filled .. so once they set in the registration that's 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

David

Quote from: GJC Web Design on March 31, 2017, 18:02:02 PM
re the shopper field
in the user account frontend either don't show it or disable it if filled .. so once they set in the registration that's it

This is not completely what I need...
I need that the customer let me know (via the registration form) that he thinks he is eligible for some discount - and after receiving the registration, I need to decide if he really is, and put it in his data - in a way he cannot change.
Joomla 3.8.3, VirtueMart 3.4.2

jenkinhill

OK then you need to use Joomla's option to have registration to be approved by an admin, at which point they can be assigned to a specific shopper group. You should set up a shopper field so they can select their status, and not permit the store products to be seen to unregistered/logged in site visitors, or the prices and add to cart could be hidden from unregistered/logged in users.  Shopper group specific prices are easy to set up.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

David

I understand this procedure. What I discuss is the way how the registering shopper will let me know about his supposed eligibility for a discount. If I make a field for this purpose, I must make it writeable - i.e. changeable by the shopper at any time after, which could make him think that the shop will react on these changes even after registration.
Joomla 3.8.3, VirtueMart 3.4.2

GJC Web Design

QuoteWhat I discuss is the way how the registering shopper will let me know about his supposed eligibility for a discount. If I make a field for this purpose, I must make it writeable - i.e. changeable by the shopper at any time after, which could make him think that the shop will react on these changes even after registration.

which is exactly what I suggested.. I have done what I mention above on sites .. e.g. they can fill it on the registration form -
when they are on their user account form I either hide it or make it read only..
you have access to it in admin

these forms can be over ridden so just do it in the template

in the display loop either exclude it or add readonly or do it by JS
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

jenkinhill

Quote
these forms can be over ridden so just do it in the template

Is easy to do.

You can also turn off "Show in account maintenance" for that shopper field.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

David

> GJC Web Design:
Yes, I believe it must be done in the user edit override, programatically.

>jenkinhill:
No, it is not so easy, because when you turn off "Show in account maintenance", the field will also disappear from the registration form.
I'd say that the only way is excluding/making R-O via an account edit override.
Joomla 3.8.3, VirtueMart 3.4.2

Milbo

It wont be stored! It must be officially in the form.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

David

Quote from: Milbo on April 03, 2017, 08:55:46 AM
It wont be stored! It must be officially in the form.

What do you mean by "be officially in the form"? :)
Joomla 3.8.3, VirtueMart 3.4.2