News:

Support the VirtueMart project and become a member

Main Menu

cart fields

Started by jimpett81, March 10, 2017, 17:41:30 PM

Previous topic - Next topic

jimpett81

Hi,

I have a rather unique request/need that I am hoping you can assist with.

We are looking to use sagepay in our cart - which on the face of it is fine -but I have an issue with the cart fields.

We only use a full name field in the cart and sagepay needs a first and second name to process payments.

Also our backend system needs the full name field to process the orders in to the database.

Could we have a system that separates the name field in to first and second name and puts them in to the two fields that sage require?

I realise this is a little odd but the only other solution I can see is having all three fields in the cart, I am open to any suggestions that allow me to get this to work.

Thanks,

James

lindapowers

#1
If you use CSVIpro there is an option to combine different fields in to one or completely the opposite so maybe you could play with it to achieve what you want.

We combine first and second name for our exported file for shipment.

Ofc this depends if exporting the orders to CSV or XML if not I believe you should modify the payment plugin to create the same effect and never change the VM core.

Regards

GJC Web Design

it is a bit hit and miss ( what happens when they fill in George W. Bush for example) so you need to "prepare" the $vm_full_name..
e.g. remove all but the last space
but in your Sage pay

$names = explode(' ',$vm_full_name);

then first is $names[0]  and last is names[1]
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