News:

Looking for documentation? Take a look on our wiki

Main Menu

Change the billing information form during purchase

Started by biciodark, February 22, 2019, 00:03:05 AM

Previous topic - Next topic

biciodark

Hello everyone. I would like to know how I can solve the problem introduced by the new legislation on electronic invoices ( italy ) that obliges those who sell to request the code sdi and pec.
This is the problem: after adding an item in the cart, I will complete the purchase. So I have to complete (without registering) billing information. In this form I would like to add 3 option button: "Public Administration" "Company" and "Private", if i select the option button  "Public Administration" a custom field called "SDI" for example must be required. But if the "Private" option button i set, the "SDI" field must be NOT required.

What should I change to do this? Can it be done without putting the code in hand or is it necessary? if yes, what is the file to edit?
finally there is a plugin that allows me to do something like that?

The ideal thing would be to have 3 option button "PRIVATE", "Public Administration" and "COMPANY" and based on the choice to make fields appear rather than others.

VirtueMart 3.2.14 and Joomla! 3.8.7 Stable
Thanks in advance Fabrizio

GJC Web Design

you need to display and hide fields depending on the select choices?

The only way is to adapt the template and code what is required in JS/php

You can see I have done a similar functionality here:

https://www.4wdpartshop.com.au/my-account/editaddresscartBT.html#

it is the same form but different fields and validations are there depending on Personal or company
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

biciodark

Gjc thanks for replay. Yes i want to do this.
The only difference Is that i don't register the user but i compile
Only the billing information. Can you help me? Which file i must modify?
Thanks 

GJC Web Design

am available for hiring .. its extensive JS etc in   templates\xxx\html\com_virtuemart\user\edit_address_userfields.php
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

biciodark

Hi GJC in in   templates\xxx\html\com_virtuemart\user\edit_address_userfields.php i do not see the folder user.....i see only invoice.
where is the file that i modify?
thanks Biciodark

jenkinhill

All that means is that you do not yet have an override. The default version of the file to edit and publish in the position GJC advised can be found at components/com_virtuemart/views/user/tmpl/edit_address_userfields.php
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