Adding extra fields in One Page Checkout

Adding extra fields in One Page Checkout

Postby stefi@.....gr » Thu Nov 21, 2013 3:31 pm

Hello, i've used OPC 1 in a couple of projects in the past using its out of the box functionality and had no problem whatsoever, but i now i need to implement something different and i'm not sure how to go about it.

What i need to do is add some extra fields in the checkout form which will be visible to both guest users (unlogged) and logged users. These fields must of course be passed to the order during the checkout & shown in the order email received by the administrator.

My initial thought was to create additional userfields from "Manager User Fields" in Virtuemart, but due to the fact that there are only two places that these may appear (Show in registration form & Show in shipping form) it works great for the guest users (if placed in the registration form) but they doesn't show up at all for the logged users.

So the question is, how can i add these extra fields & ultimately show them in my checkout form so that they can be viewed & used by both logged & guest users?

Another thing i would like to ask is, if there is a way in the checkout form for the logged users to add a new shipping address without having to click on the "page=account.shipto&next_page=shop.cart" and instead fill in a form as it is done with the guest user checkout.

Thanks in advance
stefi@.....gr
 
Posts: 1
Joined: Thu Nov 21, 2013 2:59 pm

Re: Adding extra fields in One Page Checkout

Postby admin » Fri Nov 29, 2013 3:00 pm

Hello, i must say that we had implemented all these requests into OPC2 on VM2 but it's not available on OPC1 and VM1.

To edit the ship to address it is very complicated to have it done as we did on OPC2 - with select drop down and either new fields shown or an existing address.

Regarding the fields per both logged and unlogged, i'd recommend to
- create them in VM config so you have proper database structure
- suppress it's rendering with list_userfields.tp.php
- add the fields manually (by creating each of them with proper id and name) into the theme itself onepage.unlogged + onepage.logged.tpl.php
- ps_onepage handles saving of the data, but because it does not expect new data for logged in, they have to be updated manully with own query.

i could help you with these if you are interested in custom work. i can do this as an OPC1 extension. i think it should take from 1 to 4 hours to do so depending on the type of the fields that you need.

best regards,
stan
admin
Site Admin
 
Posts: 2593
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 1.1.x

cron