SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1
Topic How do I add user input fields to order? 2094 Views

How do I add user input fields to order?

2 May 2012 at 6:35am

I sell webhosting, but when they order their webhosting I need to ask them if they are transferring a domain or buying a new domain.

If they answer yes to transferring, I need them to select their domain extenstion from my Transfer domain product group list ie .co.nz or .com etc...as some domain transfers are free while others have charges.

Then I will need them to type in the name of their domain they are transferring.

And then continue with their order.

If they answer yes to buying a domain, I then need them to select which domain they want to purchase from my domains product group list.

I then need a user input form again for them to enter in their first desired name - and then a second one for their second desired name if the first one is not available (or I might find some way to implement a domain name checker field in here.

And then continue with their order.

Which is the best way to implement this type of product with Sivlercart? Baring in my I am very new to Silvercart.

I eagerly look forward to some help on this.

Re: How do I add user input fields to order?

2 May 2012 at 4:08pm

Hi,

sounds that you don't really need the shipment step in checkout?

Try our "How to extend a CustomHtmlForm" documentation to modify the shipment step of SilverCart to add your required formfields.

You need to extend SilvercartCheckoutFormStep3 (shipment step).

When you are using different types of products you can decorate SilvercartProduct to add a "MyProductType"-property to indicate the products type.
Perhaps you can add something like a "MyAllowedTopLevelDomains"-property to a product, to limit the possible TLDs in checkout.
A webhosting package doesn't need a physical shipment, perhaps another product type does. So you can add a condition to your extended SilvercartCheckoutFormStep3 to check the products type and change the shipment steps behaviour in the products context.

Cheers,
Sebastian

Re: How do I add user input fields to order?

3 May 2012 at 1:34am

Hrm, looks like this is beyond my abilities - I am new to silvercart and silverstripe - and I am very novice at php.

I might have to look at another way to sell my products and not use a shopping cart all together.