Forums / Templates, Stylesheets, Page Layout / Product customisation. Help?????

Product customisation. Help?????

Locked

Views: 1,591

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
5 Mar 2009, 7:44 PM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Product customisation. Help?????

Hi I'm trying to make a seperate field that will be displayed on screen as 'Bottle Size' ('Product Size').

So far I have managed to create a text field in the admin system and created a new field in the database named 'products_size'.

I've created the text entry field in collect_info.php by adding the following code

<tr> <td class="main"><?php echo TEXT_PRODUCTS_SIZE; ?></td> <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_size', $pInfo->products_size, zen_set_field_length(TABLE_PRODUCTS, 'products_size')); ?></td></tr>

This displays the new field but now I need to make sure that the information entered into the new text box is also entered into the database and displayed on screen when a product is displayed.

I think by the looks of things I'm about halfway there but I need help with ensuring the information is entered into the database once the product is saved and then I need to know which file I need to edit in order to get it to display.

Please Please can somebody give me some pointers??????? As I'm really tearing my hair out. This field is essential to my site.

I'm using V.2.0 by the way.

Many Thanks

Nick

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

5 Mar 2009, 8:07 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product customisation. Help?????

I'm using V.2.0 by the way.
Where did you get that???
To my knowledge this has not been released yet??

As to the size issue:

I think that you are making this much more complicated and messing with the DB adding things when it is a builtin function and called "attributes"
https://www.zen-cart.com/tutorials/index.php?article=57

Zen-Venom Get Bitten

5 Mar 2009, 8:25 PM
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Product customisation. Help?????

Hi Kobra, sorry its 1.3.8 I think not v2.0.

I've attached a document showing what I'm trying to do.

I've had a look at the link you sent. I don't want this to be something that people select. This will be text only and purely for information on the product. So can I do this by using attributes?

Many Thanks

Nick

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

5 Mar 2009, 8:37 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product customisation. Help?????

Couldn't actually read the screen shot but this is the admin area...
So I probably do not comprehend why, or what it is you are attempting??

Zen-Venom Get Bitten

5 Mar 2009, 8:48 PM
#5
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Product customisation. Help?????

Ok, I want to have an extra text entry field that appears on all products in the admin system. This will be 'Bottle Size' and will allow me to enter 75cl 90cl, 120cl or whatever size. Once the information has been entered and submitted it will be displayed under 'Product Information' on the site and will be for nothing other than display and information purposes. It won't be something that is entered into the cart.

I've been in to product attributes but am struggling to understand how this works, however have noticed that its possible to create new attributes which I assume get added into the admin area of all products and then an admin user can enter that information in the product which will be displayed on the site. Is that correct?

If so I'm having trouble with this.

I'm getting this error

Attribute Option and Option Value Do NOT Match - Attribute was not added - Bottle Size : TEXT

So what do I do?

Thank You

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

5 Mar 2009, 8:57 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product customisation. Help?????

This will be 'Bottle Size' and will allow me to enter 75cl 90cl, 120cl or whatever size.
If I understand this and it is similar to other types of issues.
You have a bottle product that is available in several sizes, Now one can create separate products for each OR one product with optional size selection ability.

If this is the case then attributes created for size and added to these products from the admin so that the customer is provided and sees the options to select from is what you need.

To do this correctly the tutorial outlines this for size as an example. Just follow closely the steps

Zen-Venom Get Bitten

5 Mar 2009, 10:21 PM
#7
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Product customisation. Help?????

Or, if you really don't have the same product available in different sizes (which is what attributes can do nicely), but instead you offer different products and just want to tell the customer how big the bottle is, then why not enter the bottle info into the text field where you enter the product description?

Rob

Breakfast: the most important donut of the day.

5 Mar 2009, 10:36 PM
#8
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Product customisation. Help?????

Because I want to be able to enter bottle size in a text field in the admin system. Otherwise I have to type 'Bottle Size' next to the bottle size each time I enter this information.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

5 Mar 2009, 10:43 PM
#9
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Product customisation. Help?????

kobra:

If I understand this and it is similar to other types of issues.
You have a bottle product that is available in several sizes, Now one can create separate products for each OR one product with optional size selection ability.

If this is the case then attributes created for size and added to these products from the admin so that the customer is provided and sees the options to select from is what you need.

To do this correctly the tutorial outlines this for size as an example. Just follow closely the steps

No Kobra this is not what I want. I want to create a way to select a bottle size in the admin. This will then be displayed as text on the website I'm creating. I do not want a customer to be able to select bottle size as there will only be one size for each product. Most will be either 75cl or 150cl. Ideally I would like to be able to create a selection box in the admin so for example either 75cl or 150cl can be selected in order for it to show up on the site as text only.

The customer will then only see 75cl or 150cl next to the bottle size details so they know that the bottle they will buy will be the size stated. They won't be able to change bottle size from say a dropdown menu or radio buttons as there will only be one size per bottle.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

5 Mar 2009, 10:57 PM
#10
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Product customisation. Help?????

This thread may be what you're looking for.

Rob

Breakfast: the most important donut of the day.

5 Mar 2009, 11:12 PM
#11
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Product customisation. Help?????

rstevenson:

This thread may be what you're looking for.

Rob

Thanks Rob, I think this is what I'm after. I could do it with product attributes but it would be a rediculous and long winded process when it would be far simpler to have the option to do this in the product information entry area. Also I need to create another section in this to enable me to enter the year of produce since the site is selling wines and any wine connoisseur will find this information essential to making a selection to buy.

I will give this a go as it looks like it might work. If not can I come back to you?

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

5 Mar 2009, 11:45 PM
#12
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Product customisation. Help?????

Sure. I may not be very helpful if that thread doesn't do it for you, but you can ask. :laugh:

Rob

Breakfast: the most important donut of the day.

6 Mar 2009, 9:43 AM
#13
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Product customisation. Help?????

rstevenson:

Sure. I may not be very helpful if that thread doesn't do it for you, but you can ask. :laugh:

Rob

Hi, I follwed the instructions from the thread and everything works great apart from I cannot get the information that is being entered into the database to display on my site. I suspect I'm missing something really simple but I have followed the instructions very carefully.

These final two bits are definately in place (see below)

  1. edit 'main_template_vars.php' (in /includes/modules/pages/product_info/)
around line 46 you find the variable $sql set. like in step 3.2 add the new rows with a 'p.' in front just before the 'from'
select ......., p.products_guarantee, p.products_color from ....
.
    8. last step: display the new infos
edit 'tpl_product_info_display.php' (in /includes/templates/template_default/templates/)
now, wherever you want, you can add to the html:
<?php echo $product_info->fields['products_guarantee']; ?> and <?php echo $product_info->fields['products_color']; ?>

So not sure where I might be going wrong. If you can help that would be great.

Many Thanks

Nick

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk