Forums / Setting Up Categories, Products, Attributes / I need suggestions on how to enter a certain product with attributes

I need suggestions on how to enter a certain product with attributes

Locked

Views: 1,792

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
23 Mar 2009, 8:39 PM
#1
seanmyr avatar

seanmyr

New Zenner

Join Date:
Jan 2008
Posts:
20
Plugin Contributions:
0

I need suggestions on how to enter a certain product with attributes

Ok. Everyone has been really helpful and nice with my previous problems but I now have another problem that I'm not sure how to do. If you go take a look at this page...

https://tatsupply.com/showitem.php?IMAGE=tatgrafix&ID=00662&ses1=71:61626

...you can see that for this particular product there are 3 radio buttons, a text box for entering color info, a check box and another text box for entering special instructions.

I need suggestions on the best way for me to enter this product in to zen cart. Unfortunately this isn't the only product that is this way on the current site. I need a way of basically doing the same thing or if there are other better solutions to this particular product problem then I'm all ears.

Any help is, as always, greatly appreciated.

Thanks

24 Mar 2009, 9:55 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

You don't need the checkbox to add the proce to the colour.

You just append price increments to each dropdown value.

For "Option Name = Color" You should also create a dropdown Option Value called "Choose a colour", make it "default" and "display only" and do not give it any price increment.

In this way, if a customer fails to make an appropriate dropdown selection, they will be given an alert message and will not be allowed to proceed to checkout until they have made a selection. The extra $9.90 will be automatically added to the product total charge once they have made a valid selection.

20 years a Zencart User

31 Mar 2009, 4:47 PM
#3
seanmyr avatar

seanmyr

New Zenner

Join Date:
Jan 2008
Posts:
20
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

Ok. I tried putting in the products like suggested by schoolboy (and I do thank you schoolboy for the suggestion). However when I showed the client a dropdown for the color selection they didn't like it all. They want the customer to be able to enter in any color combination rather than selecting from a predefined set of colors.

So I have gone and entered the color text box and other attributes from the original store site however I still have one problem. For the text box where the customer can enter in any color combination they want, I need to be able to enter in a default color combination into the text box (ie Red on White), just like the original site has.

From what I can see in the attribute names and options admin pages there isn't a way to have default text in text boxes. Could someone point me in the right direction to get this part done. If you're wondering what I'm talking about look at the link in my original post and then look at the text box where the customer is to enter in the color combination they want.

Thank you.

31 Mar 2009, 5:45 PM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

But surely....

... if you have a text box as the option, a customer can type in anything they like...

such as:

Azure Blue with Purple spots and Zebra Stripes down the one side...

Surely you must limit colour choices to ones that are distinctly available and described?

20 years a Zencart User

31 Mar 2009, 5:49 PM
#5
seanmyr avatar

seanmyr

New Zenner

Join Date:
Jan 2008
Posts:
20
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

I understand where you're coming from but the client is the one that wants to allow the customer to enter any color they want. It's not up to me.

31 Mar 2009, 5:55 PM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

As you have noted, you cannot use concepts like ONFOCUS and ONBLUR with the attributes text field...

(edit... Maybe you can... it's used in the search input field... ???)

20 years a Zencart User

31 Mar 2009, 6:00 PM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

On second thoughts... you cant do it. Applying an ONFOCUS ONBLUR element would probably affect ALL attribute text boxes on a site-wide basis.

(You'd have the same text appear in all text attribute fields - you can't just single out one to apply it to

20 years a Zencart User

31 Mar 2009, 6:14 PM
#8
seanmyr avatar

seanmyr

New Zenner

Join Date:
Jan 2008
Posts:
20
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

Any other suggestions for putting in some default text in that field?

31 Mar 2009, 6:31 PM
#9
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

I have no idea how to write this into the code but consider...

When constructed, each text attribute input field is given a unique ID. If I look at the source code on one of mine, it says:

<div class="wrapperAttribsOptions">
<div class="optionName"><label class="attribsInput" for="attrib-7-0">Date Required.</label></div><br />
<div class="back">
<input type="text" name="id[txt_7]" size="32" maxlength="32" value="" id="attrib-7-0" />  


</div>

... so the unique ID's for that input field are id[txt_7] and attrib-7-0

Now... would it be possible to write some javascript (that loads for the product pages) that uses ONFOCUS and ONBLUR to write text into that specific attribute text input field... ?

20 years a Zencart User

31 Mar 2009, 7:31 PM
#10
seanmyr avatar

seanmyr

New Zenner

Join Date:
Jan 2008
Posts:
20
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

Thanks for the info. I'll see if I can't come up with something.

3 Apr 2009, 5:32 PM
#11
seanmyr avatar

seanmyr

New Zenner

Join Date:
Jan 2008
Posts:
20
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

I've been looking through the code a little bit and I'm confused about something. I know that regular text fields in normal HTML code can have a "value" attribute. If something is put in this value attribute it's as if it's a default value for that text field but it can be changed.

Why then is it set up in the zen cart code that text fields are not allowed to have a default value? When you go in to the "Options Values" page, you are not allowed to even see, let alone select, any option names that are set up as text fields. This is strange to me. Is there some rational reason behind this?

I haven't looked very extensively into the code but would it be possible to go into the options_values_manager.php file and comment out whatever parts do not allow text fields to have a value? If so, could someone that knows more about this code point me in the right direction so to doing this so that I don't totally mess up the code that's there and end up with a broken shopping cart?

29 Aug 2009, 5:19 PM
#12
charliea avatar

charliea

New Zenner

Join Date:
Jul 2009
Posts:
12
Plugin Contributions:
0

Re: I need suggestions on how to enter a certain product with attributes

I have the same need to put default text into a text box - I see that you managed to do it; can you enlighten me as to how to go about doing this??

PS - I agree that this should be available in the Attribute section of admin.