PDA

View Full Version : size of quantity field on products page


robynne
24-Jun-2003, 02:17 PM
Can anyone tell me how to change the size of the quantity field on the product display pages? It currently seems to display a box about 6 digits wide, and i would like to reduce that size to 3.

Also, is it possible to change the background colour of the quantity box and the search box?.(both currently white).

www.dislocate-records.com/acatalog/Dislocate_Releases.html
may help you see what i'm on about.

While you're there, how do i remove the blank lines between the product image/description and the price/qty/addtocart line?.


If anyone is kind enough to respond, please make the assumption that i'm not the smartest cookie in the pack!

Many thanks,
Robynne.

Menar
25-Jun-2003, 09:14 AM
Hi there,

Can anyone tell me how to change the size of the quantity field on the product display pages? It currently seems to display a box about 6 digits wide, and i would like to reduce that size to 3.
The quantity box is formatted using a prompt (-1, 2173) %s<INPUT TYPE=text
NAME="%s" SIZE="%d" VALUE="%d"> but the size is set hard-coded in the C++
so cannot be changed.
how do i remove the blank lines between the product image/description and the price/qty/addtocart line?.
You can remove the lines by removing the <br> tags from the template Act_Productline.html which can be found under Advance | Template manager | Section tab and then clicking on the button 'Product Line'.
is it possible to change the background colour of the quantity box and the search box?.(both currently white).
I believe this may not be possible, however I will investigate and let you know.

Hope this helps.

harlequin
25-Jun-2003, 09:20 AM
hi menar,

quote:
The quantity box is formatted using a prompt (-1, 2173) %s<INPUT TYPE=text NAME="%s" SIZE="%d" VALUE="%d"> but the size is set hard-coded in the C++ so cannot be changed.

I just changed SIZE="%D" above to SIZE="1" and this shrinks the box

Menar
25-Jun-2003, 09:25 AM
Hi there,

I believe that the area may be set to accept 1 charactor, therefore when I tried inserting -1, which didn't work, but well done.

Jan
25-Jun-2003, 09:30 AM
Originally posted by harlequin
hi menar,

quote:
The quantity box is formatted using a prompt (-1, 2173) %s<INPUT TYPE=text NAME="%s" SIZE="%d" VALUE="%d"> but the size is set hard-coded in the C++ so cannot be changed.

I just changed SIZE="%D" above to SIZE="1" and this shrinks the box
Be careful with this Steve because in the code there will be something that takes that prompt and replaces the %d's with values, it will have two strings and two numbers in the code and will just replace them in order. You have taken out the %d so now you will almost certainly get whatever would have gone into the size clause in the value clause and the value itself will be lost.

Cheers,

harlequin
25-Jun-2003, 09:35 AM
suppose i better test

will let you know of any advers affects

steve

robynne
25-Jun-2003, 09:46 AM
Originally posted by Jan
Be careful with this Steve because in the code there will be something that takes that prompt and replaces the %d's with values, it will have two strings and two numbers in the code and will just replace them in order. You have taken out the %d so now you will almost certainly get whatever would have gone into the size clause in the value clause and the value itself will be lost.

Cheers,

Jan,
As you were responding, i have just tried altering the size ="%d" to size="1" (which gives me a 3 character input display). As you predicted, it resulted in my quantity field defaulting to "4" (go figure!).
I tried changing the value="%d" field to "1" as well, and this has given me the default qty of 1 that i want. Am a bit wary of doing this, as i don't have a clue if that is what the field is meant for.
Can you shed any light on the 'value' field?
Also, are you implying that this change will affect other aspects of my site as %d is used elsewhere?
ie. if this change is going to cause me problems further down the track, maybe i should just live with a thick, ugly quantity box?!

thanks for any info,
Robynne

Jan
25-Jun-2003, 09:52 AM
Robynne,

If you set the second field to 1 as well it will be fine, you will only have problems if you remove them and there are more %'s to the right. You just need to double check that the default values are used if nothing is changed. There will be no side effects on other parts of the site, the %d is a programming thing and each prompt that uses it will be dealt with in a different part of the program.

Regards,

harlequin
25-Jun-2003, 09:55 AM
hi all, just uploaded a test page at http://www.tiggypig.com/acatalog/harlequinsmallqtytest.html (marks out today but i am sure he wont mind!)

i also changed the value="1" as above.

it seems to order etc.....dont know if it has any further implications but it seems to be all fine for now.....

steve

robynne
25-Jun-2003, 10:02 AM
Originally posted by Jan

you will only have problems if you remove them and there are more %'s to the right. You just need to double check that the default values are used if nothing is changed.

Sorry Jan,
what do you mean by "more %'s to the right"?
Also, does the size and value field have to always be the same? ie. can i use size="2" (for a wider qty box) and value="1"?

cheers,
Robynne

Jan
25-Jun-2003, 10:12 AM
Originally posted by robynne
Sorry Jan,
what do you mean by "more %'s to the right"?
Also, does the size and value field have to always be the same? ie. can i use size="2" (for a wider qty box) and value="1"?

cheers,
Robynne
Sorry to be confusing, basically I am saying that you can replace %d or %s with text so long as their are no more occurences of %s or %d after the ones you have removed.

The size and value fields are independant so you can set them to whatever values you want to, so size = "2" and value = "1" will be fine.

Regards

robynne
25-Jun-2003, 10:20 AM
Many thanks to all, for your help (and patience with me).

Menar, look forward to the results of your investigations into changing the background colours of the qty and search box.

regards,
robynne

NormanRouxel
25-Jun-2003, 11:28 AM
changing the background colours of the qty and search box.

I think adding some inline style to the <input> field will do it.

e.g.

<input style="background-color: #112233" .......>

where ..... is what you had there already.

Norman

robynne
25-Jun-2003, 02:44 PM
It works like magic.
thanks Norman - you're a star.

regards,
Robynne

Kerri
26-Jun-2003, 10:55 AM
Originally posted by harlequin
hi all, just uploaded a test page at http://www.tiggypig.com/acatalog/harlequinsmallqtytest.html (marks out today but i am sure he wont mind!)

i also changed the value="1" as above.

it seems to order etc.....dont know if it has any further implications but it seems to be all fine for now.....

steve

Steve,

Site looks fantasitc.

Really like what you've done with the TiggyPig price bit - especially the conversion line euro, US dollar other etc

how did you do this? what's the code? do I have to edit a template or create my own one?

It would be really useful to put it on our web site, currently, we only have it in our checkout area. Customers ask what the prices are in USD all the time and I have been looking to find away to do a conversion for each product before they "add to cart". Looks like you've mastered it!

If you can spare the time, please could you advise me?
Email: support@skatejunkie.co.uk

T.I.A for your advice.

harlequin
07-Jul-2003, 06:04 PM
thanks for your comments but i must point out another company http://www.prophecy-designs.co.uk/ecommerce.htm Prophecy Designs done all the actual graphical design work.

We did however do the custom bits like the currency converter, added normans excellent normenu...(sorry i still cant call it nortree!), the review this product script, email a friend thingymajig and also allowed tiggypig to put in extra product images etc......

...as for the currency converter I would happily tell you all here how to do it but I happen to know that Jan is going to give the code away with her monthly newsletter for Actinic Users, if you get over to www.mole-end.biz quickly and register you will probably get a copy....if you need it quicker though please email me off forum...


Steve Quinn
steve@<NOSPAM>harlequindomains.com
www.harlequindomains.com
Actinic Design, Hosting and Marketing
0800 0832077

NormanRouxel
07-Jul-2003, 09:36 PM
Regarding overriding one of the early %d or %s values. Just stick in a dummy tag to use up that % placeholder. E.g.

size="%d"

can be replaced with

size="2" dummy="%d"

with no adverse effects on later parameters as the dummy tag will be ignored.

Norman