Adding Field to Order form

kat00

Avatar: kat00

2009-01-25 13:15

Hi Guys, glad I found this software.

It is incredibly functional for freeware. I only have a very limited product range so the free version will do me for the time being, should I have any success I'd certainly be looking to purchase a licence.


Ive searched and I can not find a definite answer on how to add a field to the order form.

Ive seen the instructions on how to add a Country but I'm not sure that will suit my purposes it seems you need to store a list of Countries in the QC DB. so as it will call from that list of Countries......I don't want it to call on the list, I just want an input in the field and that input could be anything.

The field name I need is Username, my intended market will know what is required from them but like I said, that username could be anything.......exactly the same way a phone numberor a name or address could be anything.

How would I go about doing this, are the any posts on the board that I have missed?

Thanks again.

Cheers

» Quick.Cart v3.x

I can't belive just how well QC suits my purpose.

beholder

Avatar: beholder

2009-01-25 14:03

adding a field with input that is not checked is easy; the question is, what do you want do do with it after the form is submitted. What's your take on that?

kat00

Avatar: kat00

2009-01-25 15:02

I need a username to show up on the order form in the Admin CP. Thats all.


Id doesn't necessarily have to be a mandatory input..............even if I could change the "company" field to "username" that would suffice.

I can\\\'t belive just how well QC suits my purpose.

beholder

Avatar: beholder

2009-01-25 20:23

oh this is really easy then,
add to templates/orders_form.tpl after <div id="company">...</div>:


          
<div id="company">
            <
label for="oNewField">Here comes text for your fieldlike ENTER CODE or something</label>
            <
input type="text" name="sNewField" value="$aUser[sNewField]" maxlength="100" class="input" onblur="saveUserData( this.name, this.value )" id="oNewField" />
          </
div>



Next in core/orders.php, after line:


        $aForm
['sCarrierName']  = $aCarrier['sName'];


Add this:


    
if (isset($aForm['sNewField'])) $aForm['sComment'] = $aForm['sNewField']."|n| |n|".$aForm['sComment'];



This way you will have it displayed in comments for the order. Should be more than enough for basic use. This way you don't have to alter db or anything and the whole system is easily upgradable.
BTW I spent 1/4 hour on this, have a beer on me. Cheers!

kat00

Avatar: kat00

2009-01-26 00:14

Yeah, that's perfect. Worked spot on.
That is really good of you.

I'll have two beers for you.

Thanks heaps.

I can't belive just how well QC suits my purpose.

beholder

Avatar: beholder

2009-01-26 04:02

btw try to work with page redirects, if you already haven't. I love the way they work, I think you will appreciate too.
They mainly help you to redirect one page to another, so you can have one page name in menu and totally different page name when user clicks that link in the menu. It can even use relative links (not using full links only something like "?44,new-products"), you wouldn't believe how useful it is, especially when using the same webshop db in webshops on several domains.

Would you please give us a link to your test or live website? I am quite interested to what ends people mold the basic webshop, you also seem to work with the free version. BTW if you have any (small) problem, don't hesitate to ask on this forum, I bet many similar problems have already been solved here anyway.

kat00

Avatar: kat00

2009-01-26 12:35

Thanks for the tip, I'll see if I can use it.....

As for the link http://nswrats.com/shop/ what do you think? Hope I haven't violated any rules by modifying it the way I have....If you want some licensing coin I'd be happy to give you some.

One other problem I have is that the Banner I am using appears fine on FireFox but its slightly off t the left in Explorer and I can't figure out why?

Its a pretty small range. All I'm trying to do is to raise a small amount of profit so as I can pay for the the server charges for my forum. Got nearly 2000 members on the forum, don't want to charge them for membership.

Thanks again.

I can\\\'t belive just how well QC suits my purpose.

beholder

Avatar: beholder

2009-01-26 17:43

it's a nice website.

I've tracked your problem to this line in your newskin.css file:
#main{width:750px;margin:0 auto;border:2px solid #00079e;text-align:left;}

you have border:2px but the your (and QC default) template needs this border to be 8px, otherwise the header pic display is fuxxored. Surely this dependency can be changed in the #head2 but I am not skilled in CSS and can't give you much advice on that.

kat00

Avatar: kat00

2009-01-27 13:58

You gave me a good clue there........I changed the border to 8px and made the border colour the same as the background. Problem solved.

Kat00 nil
Beholder 2 beers lol

Thanks again.

I can\\\\\\\\\\\\\\\'t belive just how well QC suits my purpose.

beholder

Avatar: beholder

2009-01-27 15:04

btw your head pic has a border and right now it looks weird considering the upper-most menu looks 2 px wider (it is not, it's the border on the pic).
Also you need to make the #head2 height about 1-2 pixels higher, because when you disable border, a gray border on top will remain but on bottom it will probably totally disappear and main menu would be gued to the image.

dogdayfear

No avatar

2009-02-04 12:26

I have used the trick on this page and works nice.

But I have gone one step far. Im trying to implement DatePicker. It is for choosing a date into a form field.

The problem is that the ajax scripts DatePicker loads, have problems with the default scripts that quick.cart loads to show big images.

I have commented in container.tpl the load of default scripts for you to see how it works.

Here is the url: http://www.elcarrusel.es/carrito_gratis

Make an order and in the final screen click into the 'Fecha de entrega' field. You will see a calendar to choose a date. Take a look at the page source code.

Is there a way to make this field mandatory?

Is there a way to avoid conflicts between scripts loaded?

Thanks a lot in advance. And a lot of thanks for this wonderfull app.

beholder

Avatar: beholder

2009-02-04 15:46

Yes, there probably is a way. Try to add:
alt="simple"
to the input tag for that particular Fecha de entrega item.

dogdayfear

No avatar

2009-02-04 16:48

Thanks a lot, beholder.

With your trick, 'Fecha de entrega' is now a mandatory field. And it works.

What about the other problem?

The conflict between ajax libraries. Is there a way to solve this?

Again thanks in advance.

beholder

Avatar: beholder

2009-02-04 17:12

can't help you there I am not a JS wizard. Why don't you start your own thread about it.

dogdayfear

No avatar

2009-02-04 18:11

So sorry about posting in the same thread. I tought it was in relation.

I will consider opening a new thread.

Sorry again.

Back to top
about us | contact