Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Attributes - Option Type Feature


jdimaging

Recommended Posts

I am new to oscommerce and loving it, except for today. I am working on doing my site in oscommere at My Webpage

and the first contribution I installed was option type feature as this is imperative for personlized products. Then I continued adding other contributions as was able to add the text option to each product.

 

Have added many products and thought all was going well. Today I tried an order and when the customer puts in the personalized info nothing goes through to the cart. It just said the option type for example name with no personal information.

 

I had done a test store before and this contribution worked perfect, now for the real one I have done something wrong and have absolutely no idea how to fix it.

 

Any help would be so greatly appreciated as I am totally at a loss.

 

Thank You.

 

Darlene

Link to comment
Share on other sites

This is most often caused by using an option value other than TEXT (which has an ID of 0 if you used the insert SQL while installing the contribution). It could also mean that your text value ID is not set properly in configure.php.

 

Hth,

Matt

Link to comment
Share on other sites

Thank you for your reply. Yes I used the insert SQL and checked in phpmy admin and the option value is 0, also checked the configure.php and the text value ID is set to zero as well.

 

I think this is what I am supposed to have, though I am so confused no I have no idea.

 

Darlene

Link to comment
Share on other sites

Success I did a document compare and even though I had done a copy and paste in the config the the file compare said there was a difference. I changed the config and it works fine.

 

I still have one more problem. I need some of the text input fields to be longer than 32.

Be sure you know what you're doing if you attempt to increase the length beyond 32 characters
is where the problem lies as I am not sure what I would do here. Which files would be affected and what functionality will be effected. Any input would be greatly appreciated. Thanks.

 

Darlene

 

Products_options set the products_options_length and/or products_options_comment.  These values must be manually edited in the table.

 

The products_options_length determines the max length of the text option.  It is limited to 32 characters. (This limit is based on the size of fields in the customer_basket and order tables where the text value is later stored. This limit can not be changed without effecting other functionality.  Be sure you know what you're doing if you attempt to increase the length beyond 32 characters.)

Link to comment
Share on other sites

What Chandra told me when I asked was that the main problem was that the display can get messed up with more than 32 characters (not sure of the cut off; it's higher than 32, but I don't know how much higher). This would happen on the shopping cart and checkout confirmation pages. You can change the effective value by changing the appropriate field widths in customers_basket_attributes and orders_products_attributes. Both hold the option value as a varchar(32). You can change the 32 to be up to 255. If you need more than 255, you need to change to a text type.

 

If you do encounter display problems, it might help to know that you can truncate a string with substr, e.g.

define('MAX_OPTION_VALUE_LEN', '32');
$string = 'This string is longer than thirty-two characters';
echo ((strlen($string) > MAX_OPTION_VALUE_LEN) ? substr($string, 0, (MAX_OPTION_VALUE_LEN - 3)) . '...' : $string);

which should display

This string is longer than th...

Hth,

Matt

Link to comment
Share on other sites

  • 3 weeks later...
You can change the effective value by changing the appropriate field widths in customers_basket_attributes and orders_products_attributes. Both hold the option value as a varchar(32). You can change the 32 to be up to 255. If you need more than 255, you need to change to a text type.

 

So how do you change to a "text type" and are you talking about a <textarea> as in HTML?

 

If so this is exactly what I am looking for.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...