Jump to content
Sign in to follow this  
Chandra

Option Type Feature v1.6 (for osc 2.2 MS2)

Recommended Posts

I am trying to get Master Products and Option Type v1.71 to work together. So, far my only draw back is the text boxes pulling through to the cart. 

 

I'm a newb at php, but I think I have it narrowed down to how Master Products and Option Type parse the variables differently when added to the cart. 

 

A correct value for a text input field should have the txt as part of the option value id (as per sample)

<input type="hidden" name="products_id[]" value="97{txt_1}12589">

 

However, when using Master Products to add the items to the cart, the txt is missing:

<input type="hidden" name="products_id[]" value="97{1}test123">

 

I know the missing "txt" is the key to my problem. What I do not know is how to get the Master Products code shown below to append the txt to the option value id

//Master Products
    // customer adds multiple products from the master_listing page
    case 'add_slave' :
                            reset($HTTP_POST_VARS);
                            while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
                              if (substr($key,0,11) == "Qty_ProdId_") {
                                $prodId = substr($key,11);
                                $qty = $val;
                                if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {
                                  // We have attributes
                                  $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);
                                } else {
                                  // No attributes
                                  $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);
                                }
                              }
                            }
                            tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                            break;
    //Master Products EOF

If any one has any ideas, I would greatly appreciate any help, this is the one thing keeping me from turning my site live (I've been running interchange for almost 5 years now, and am anxious to move over to osCommere!)

 

Thanks,

Dorothy

 

I'm having exactly the same problem too. How did you managed to solve it (if you solved it...) ?

Share this post


Link to post
Share on other sites
I'm having exactly the same problem too. How did you managed to solve it (if you solved it...) ?

 

Well, I did a work around for it. Basically, I have the "text boxes" only working if the product is standalone (no slaves). I added an extra field to the products table, then ran a couple of if statements based on that field. Works great for my application, but it may not work for what you're looking for. If the product has slaves, than the options won't work, as the form action is different for a "slaves" or "non-slaves" product.

 

If you want more info, you can PM me.

---

Thanks,

Dorothy

Share this post


Link to post
Share on other sites
Fixed it....

 

Now i am just getting a dropdown box that says "TEXT" where the input box should be. AGAIN

 

I checked my configure.php this time and its uploaded..

 

Any ideas?

 

 

Did you ever figure this out??

 

Having the same issue of dropdown boxes where text/textarea/input boxes should be.

 

Any help would be greatly appreciated.

 

Thanks!

Share this post


Link to post
Share on other sites

:'(

This is a great contribution...got it all the way to the point of the text options show up in the cart and during checkout but in the emails and order history all that shows is TEXT

 

 

literally "TEXT"

 

I'm tired please help.. :'(

Share this post


Link to post
Share on other sites

Hi,

 

I have a problem. I installed this contribution and easy populate with attributes. When I upload the modified Products with attributes (text input, text area...) all the text input, text area are not uploaded.

 

Any solution to this problem. Any help is appreciated. Thank you. :'(

Share this post


Link to post
Share on other sites
:'(

This is a great contribution...got it all the way to the point of the text options show up in the cart and during checkout  but in the emails and order history all that shows is TEXT

literally  "TEXT"

 

I'm tired  please help.. :'(

 

OK got it working. Am using multistore, so had to file compare and merge ,for days on end... :rolleyes: :rolleyes: :rolleyes: :rolleyes: :rolleyes:

 

Thanks to all that put this together

:D

Share this post


Link to post
Share on other sites
My install works fine EXCEPT...

the field lables don't show up in the shopping cart, admin pages, ect...

and the field sort order seems entirely random. They show up in a different order every time.

 

I've read through and tried everything I could find about Option Type Feature, checked all my files again, but no luck.

I'm using v1.6 and osc2.2ms2

 

Anyone out there solved this problem??

thanks!

 

I got tired of reading through page after page after page to see if someone had responded to this question regarding the SORT ORDER of product options. I made a mySQL change in the product_info.php file as follows:

 

OLD VERSION:

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" );

 

UPDATED VERSION:

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' Order by products_options_values_name ASC" );

 

This update orders the options alphabetically according to the name of the option. You may change the way it is sorted (e.g., by products_options_values_id). I realize there are other contributions that are supposed to make these adjustments. I have not had any luck getting them to work with my configuration in an amount of time that would not put me behind with my clients. I think the contributions would be easier and more robustly helpful, but this is a quick fix for those who are in a hurry.

 

I make no promises about testing or errors. You use this at your own risk as I am also using it at my own risk. Please remember to back up before you make changes.

Share this post


Link to post
Share on other sites

I have been using this great contribution for some time now, and I just started receiving the following error when trying to assign an attribute:

 

1136 - Column count doesn't match value count at row 1

insert into products_attributes values ('', '40', '11149', '0', '', '+', '0')

[TEP STOP]

 

I've installed other contributions, so I think I've messed something up somewhere, but I am not sure where to begin to look. Any suggestions??

 

Thanks,

Dani

Share this post


Link to post
Share on other sites

THANKS! I did have extra columns. Now, I just have to figure out what contribution they belong to!! ? :blink:

 

- Dani

 

Dani, buddy, this is a simple one.  It is trying to insert those values into your database, but the columns don't match up.  So see what columns you have and what it is trying to put in and match them up.

Share this post


Link to post
Share on other sites

Fractional Decimal text area for fabric?

 

Is anyone using the text field part of this contribution to create a text area where the customer could enter decimal increments like 1.25 or 1.5, and then have that number multiplied to the base price for a final price.

 

Is that possible with this contribution?

 

If you are, please reply & let me know what you did.

Share this post


Link to post
Share on other sites
Fractional Decimal text area for fabric?

 

Is anyone using the text field part of this contribution to create a text area where the customer could enter decimal increments like 1.25 or 1.5, and then have that number multiplied to the base price for a final price.

 

Is that possible with this contribution?

 

If you are, please reply & let me know what you did.

 

 

Yeah, that is very much possible, and the code would probably be pretty easy to do also, but I'm not doing that nor have I looked into it. But, if nobody else gives you the answer i may be able to work up some code for you real quick.

Share this post


Link to post
Share on other sites

Okay, new problem now. When I view orders in admin/orders.php, I only see some of my product attribute information. However, all of the information comes over in my email order confirmation, and when I check the table orders_products_attributes, all the information is there.

 

I do not think the problem is with orders.php because orders placed last month are still showing all their attribute information. Since all of the attribute information is going to the database and through the email, I'm confused as to where the problem is happening.

 

Any suggestions??

Share this post


Link to post
Share on other sites

I'm using osc Paypal IPN, and I've applied the patch from earlier in the topic. But I'm having the problem whereby any text attribute items are coming in blank, but radio buttons are working ok. An example from the order page on admin:

 

50 x Personalised Keyrings

- : Hercules

- :

- :

- : <----- These four lines are supposed to the four lines of text

- : a customer wants to put on a keyring.

- :

 

If I use cheque as payment method, it comes through fine.

 

Help! :'(

Share this post


Link to post
Share on other sites

Hi I've got the contribution working fine so thanks for that :D

 

Does anyone know how I can force the qty to always be 1 for the text option?

 

And, how can I make the product_info.php page update instead of add a new product for the text option only?

 

Thanks

 

Jane

:s

Share this post


Link to post
Share on other sites

i installed this contribution on an already existing completely custom/edited oscommerce site and it works great so far (was a pain to install on an already built site but it's working :D)

 

what i wanted to know is if the Option Type Feature contribution will work with this contribution:

 

Attribute Sets

http://www.oscommerce.com/community/contri...h,AttributeSets

 

 

i have a ton of products and i need to find a way to simplify adding product attributes without having to go product by product. the above contribution groups a bunch of attributes into one set, then all you have to do is apply the set to the product instead of having to apply each attribute to a product.

 

has anyone used Attribute Sets with Option Type Feature?

 

thanks

Share this post


Link to post
Share on other sites

Well I'm at my wit's end. I think I have everything merged and installed. However, when I enter information in a text box, it doesn't get transferred to the shopping cart. All that shows up is "Comic ID TEXT" (Comic ID is the name of one of my options)

 

http://kimandjason.com/shop/product_info.php?products_id=555

 

I'm sue there must be something I missed but I'm not too well versed in PHP and I found the instructions a little hard to follow. Any help would be much appreciated.

 

Jason

Share this post


Link to post
Share on other sites

Hi all,

 

I've got this contrib installed and it's been working on my site - off & on. The only option I am using is the "textarea" box for gift card messages. My problem is this:

 

1) Customer selects product #1

2) Types in message

3) Continues to shop

4) Selects product #2

5) Types in message

6) Goes to shopping cart

7) Realizes they don't want item #1, so they select "Remove" and clicks on "Update Cart" button

 

The Problem:

The text from the textarea box will disappear from the remaining product in their cart.

 

You can test at My Site, but please do not complete orders because the site is *LIVE*. (Unless, of course, you see something you like. :D ) You shouldn't have to create an account to see your shopping cart, so you will be anonymous.

 

Any and all help would be greatly appreciated!

 

Chris B.

Share this post


Link to post
Share on other sites
Well I'm at my wit's end. I think I have everything merged and installed. However, when I enter information in a text box, it doesn't get transferred to the shopping cart. All that shows up is "Comic ID TEXT" (Comic ID is the name of one of my options)

 

http://kimandjason.com/shop/product_info.php?products_id=555

 

I'm sue there must be something I missed but I'm not too well versed in PHP and I found the instructions a little hard to follow. Any help would be much appreciated.

 

Jason

 

I also thought I should add that I really didn't understand

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

I have a feeling that that might be my problem...but I don't really know.

Any help would e greatly appreciated.

 

Jason

Share this post


Link to post
Share on other sites

im getting the

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/germanp/public_html/store/includes/functions/general.php on line 42

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/germanp/public_html/store/includes/functions/general.php on line 42

 

error now

 

doesnt seem to happen all the time, just sometimes. i find others that have had it here in the forum but i cant find the solution

Share this post


Link to post
Share on other sites

Happy day for me...I figured out the issue to my problem...it ended up being a missing snippet of code in the shopping_cart.php file.

 

Perhaps a suggestion for future releases would be to more clearly mark the areas that need to be merged? Some contributions do a really good job of this, which helps newbies like me.

Share this post


Link to post
Share on other sites
im getting the

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/germanp/public_html/store/includes/functions/general.php on line 42

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/germanp/public_html/store/includes/functions/general.php on line 42

 

error now

 

doesnt seem to happen all the time, just sometimes. i find others that have had it here in the forum but i cant find the solution

 

try adding a @ in front of the function in general.php

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×