Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

option type feature and MS1


dogu

Recommended Posts

Hi folks,

 

is anybody out there, who have implemented the option_type_feature (http://www.oscommerce.com/community/contri...ions,160/page,7) into osc-MS1 yet??

 

Whould be nice to hear from U

 

Regards

Dominik

Maintainer German Banktransfer 0.92

The answer to the great question of life, the universe and everything is 42 (Douglas Adams)

Link to comment
Share on other sites

i use the option type feature too..but in an older december-snapshot..it works fine..bur it doesn?t runs under MS1..i tried some things and i think the both classes order.php and shopping_cart.php are the problem...

 

i?m also very interested to get a working one for MS1..a few days ago i mailed to the author of it, but he has no time these days... :(

WAR is not the answer!

Link to comment
Share on other sites

  • 8 months later...

I've installed it and everything works but the Option name isn't being displayed in the shopping cart or order confirmation. Is this the problem you guys are having?

 

Here is an outline of what I've done, and where I'm stuck. If anyone can help, that would be great!

 

After carefully double-checking the README that came with the Option_Type_Feature (v1.6), no matter what I do the Option name isn't being displayed in the shopping cart, order confirmation, or confirmation email. After three days of troubleshooting, I am now asking anyone for help!

 

Here's where I am at:

 

The new Option name is "IMEI" and it is a text box for customers to enter a 15-digit number that needs to be passed along with the order. It appears fine on the catalog/product_info.php?products_id=28 page, but when the number is entered into the text field and the "Add to Cart" button is pressed to continue along to the catalog/shopping_cart.php, it does not appear in the Product(s) list. Instead, what I get on the catalog/shopping_cart.php page is a blank space where the text info for "IMEI" should be. In total, the customer chooses 3 options when purchasing a Nokia Wireless Unlock Code:

 

ie. the Product field displays:

 

Nokia Wireless Unlock Code

- <blank> ----> this is where the new IMEI text info should be!

- Model 3300 ----> this is a drop-down list option that works fine

- Network USA - T-Mobile, USA Inc ----> this is a drop-down list option that works fine

 

 

 

INSTALLATION CHECKLIST

 

STEP 1. Add new fields to db

 

I had to add the following fields to table products_options, either using an enclosed option_type_feature.sql or manually using the following definitions:

 

NAME: products_options_type

TYPE: int(5)

NULL: No

DEFAULT: 0

 

NAME: products_options_length

TYPE: smallint(2)

NULL: No

DEFAULT: 32

 

NAME: products_options_comment

TYPE: varchar(32)

NULL: Yes

DEFAULT: NULL

 

Add the following field to table customer_basket_attributes

 

NAME: products_options_value_text

TYPE: varchar(32)

NULL: Yes

DEFAULT: Null

 

************DONE - fields successfully added.

 

STEP 2. Install files containing the feature into your version of osCommerce

 

************DONE, all files were carefully merged (even though I started with a clean version) and

then uploaded to the server.

 

Then, I needed to apply CHANGES TO catalog/includes/configure.php, specifically:

 

// CLR 020605 defines needed for Product Option Type feature.

define('PRODUCTS_OPTIONS_TYPE_SELECT', 0);

define('PRODUCTS_OPTIONS_TYPE_TEXT', 1);

define('PRODUCTS_OPTIONS_TYPE_RADIO', 2);

define('PRODUCTS_OPTIONS_TYPE_CHECKBOX', 3);

define('TEXT_PREFIX', 'txt_');

define('PRODUCTS_OPTIONS_VALUE_TEXT_ID', 0); //Must match id for user defined "TEXT" value in db table TABLE_PRODUCTS_OPTIONS_VALUES

 

************THIS WAS MERGED SUCCESSFULLY & UPLOADED

 

Then, I Checked if PRODUCTS_OPTIONS_VALUE_TEXT_ID matches id for user defined "TEXT" ...:

 

My Table products_options_values READ THE FOLLOWING:

 

products_options_values_id = 0

language_id = 1

products_options_values_name = TEXT

 

products_options_values_id = 0

language_id = 2

products_options_values_name = TEXT

 

products_options_values_id = 0

language_id = 3

products_options_values_name = TEXT

 

STEP 3. Set up your TEXT Option Value.

 

Instructions were: Add a new record to the table products_options_values. You can either use the enclosed insert_text_option_value.sql or you can manually update the table. (Note: The file will create three entries with products_options_values_id=0. One with language_id=1 (English), one with language_id=2 (German), and one with language_id=3 (Spanish). If you use other languages then you must create a new entry for each additional language.)

 

************DONE, Table products_options_values reads as above

 

4. HOW TO SETUP PRODUCTS TO USE DIFFERENT OPTION TYPES

4.1 How to Create a Text Option (or two or three...)

 

Instructions:

STEP 1. Use the admin tool to create a new Products Option. (In upper left table)

 

OPTION NAME: First Name <------ Note: I used "IMEI" instead of "First Name" ------>

 

Set the Option Type equal to 'Text'. This is done using the option type dropdown. (If you don't see an option type dropdown, then you likely didn't install the admin files that came with this feature.) The option type can also be updated manually in the table products_options.

 

***********DONE, this works fine.

 

OPTIONAL:

 

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

 

I checked the table products_options, WHICH READS THE FOLLOWING:

 

products_options_id=9

language_id=1

products_options_name=IMEI

products_options_type=1 **

products_options_length=33

products_options_comment=NULL

 

**(NOTE: my other product options, Model & Network both=0, not sure if the new should read 1 or not)

 

************DONE

 

 

STEP 2. Use the admin tool to create a new Product Attribute.

 

Created:

PRODUCT NAME: Nokia

OPTION NAME: IMEI

OPTION VALUE: TEXT

VALUE PRICE: 0

PREFIX: +

 

**************DONE, and the new attribute joined the others in the list, properly

 

STEP 3. Update the Product Options to Product Options Values mapping.

 

Some contributions require that the products_options_values_to_products_options_id table list the mapping of option types to option values. If you use one of these contributions, then you must add a new record to the products_options_values_to_products_options table whenever you setup a new text option. Currently there is no admin tool for this step, so you must do it manually.

 

products_options_values_to_products_options_id=Let this autogenerate

products_opitons_id=Id from step 1

products_options_values_id=value of PRODUCTS_OPTIONS_VALUE_TEXT_ID (likely 0)

 

My Table products_options_values_to_products_options READS:

 

products_options_values_to_products_options_id=33

products_options_id=9

products_options_values_id=0

 

** I'm not sure if I've done something here or not ----- I am a first time user of PHPMyAdmin and this is the first time I've adjusted a MySQL database. I believe I've set it up properly, but obviously not ....

 

From the README FAQs, my problem is listed there, which reads:

 

Q. The Option name isn't being displayed in the shopping cart, order confirmation, or confirmation email?

 

A. This almost always indicates a problem with your data. Make sure that define('PRODUCTS_OPTIONS_VALUE_TEXT_ID', 0); is set correctly in your configure.php. [CHECKED THIS, IT IS OKAY] Also make sure that your product attribute is associated with the correct Option and Option Value. A common mistake is to associate a text Option with an Option Value other than TEXT.

 

Appears in "Product Attributes" (in admin) as:

Product Name: Nokia Unlock Code

Option Name: IMEI

Option Value: TEXT

Value Price: 0.0000

Prefix: +

 

HELP! Can anyone tell from the information I've provided above WHY the new text Option name "IMEI" and the string of numbers that are entered in the field by the user are NOT being displayed on the shopping cart or further pages as the order is confirmed?

 

Much Thanks!

 

Jeff

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.

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...