Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Guest

Recommended Posts

Hi everyone,

Good contribution. Installed without problems, except, that option names does not appear in shopping_cart.php, confirmation and e-mail. I have looked for this in the forum, but there is no a clear answer. I have read something about products_options_values_name in the database, but I don't know how to work this this. Someone please can post any solution to this problem.

thanks

far

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 799
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...

Hi Chandra,

 

This is an awesome contribution -- thanks for putting it together, and for the accompanying README file, which is one of the most detailed I've seen. I'm not the most well-versed in PHP, but I managed to install this tonight with absolutely no problems. ( Woohoo! ) :)

 

Only one question: The inputted text appears to be wrapped between NOBR tags. On my checkout pages, it's throwing my alignment off with them there, but I can't figure out where the NOBR's are being called from to fix them. Can you help me figure it out?

 

Many thanks in advance!

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

  • 2 weeks later...

Apologies if posted already - found an issue with Product Attribute Tax not being displayed in the Product_info page, although it is added when moved to the cart.

 

It looks like this is a small bug in this fine contribution, so cross posting the fix.

 

http://www.oscommerce.com/forums/index.php?showtopic=81255&st=0

 

Cheers

Rob

Link to comment
Share on other sites

Thanks for a great contrib. Its just what I needed. I also had problems with the attribute value not showing up in the checkout or the confirmation email (it showed up in the shopping cart). The answer to my problem was that I had chosen not to update one line in \includes\classes\order.php ~line 242 in my version.

 

Original:

'value' => $attr_value,

Updated Line:

'value' => $attributes['products_options_values_name'],

 

 

After I changed this line, everything worked perfectly.

 

 

Now how about a way for customers to add multiline comments. I've seen someone else ask about this, but no update.

 

thanks,

--m

Link to comment
Share on other sites

I am having some trouble with my option type installation and could desperately use some guidance.

 

When data in entered in text fields, the data appears in the shopping cart and on the checkout confirmation page. However, when I view the order via Admin, the word "TEXT" appears rather than the data.

 

I have been reading through the forum and have seen the warning about TABLE_PRODUCTS_OPTIONS_VALUES. To confirm, my products_options_values table lists: products_options_values_id = 0 and products_options_values_name = TEXT. I have also confirmed that my config file lists: define('PRODUCTS_OPTIONS_VALUE_TEXT_ID', 0);

 

What else do I need to double check/confirm?

 

When adding a text attribute, I just want to confirm that all I have to do is assign the option name and option type (Text from the dropdown). I don't have to do anything with the "Option Values" section, do I (unless it is a radio button)?

 

I have noticed that in my products_options table, the products_options_type is not 0 for my text options. Is that the error? When I tried manually changing those to 0, I received a dropdown box with the word TEXT.

 

As you can see, I'm totally lost now. Any help would be appreciated!!

Link to comment
Share on other sites

Thanks Matt, you are right. I was using the PayPal IPN contribution and hadn't updated the checkout pages. Thanks so much!!

 

- Dani

Link to comment
Share on other sites

ok, finally got the mod working but it seems to have messed up another contrib in the process. I have a contrib to print the order details and when I click it I get this error:

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /www/f/fmabdulky/htdocs/catalog/includes/functions/general.php on line 46

 

and I don't know how to fix it. Its funny since when in the admin area and I click packing slip or invoice everything comes out dandy.

 

Thanks for the help, I really need both these working

Edited by ryanf

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

I have tried everything I can think of on this one and still am getting the same error. I have changed general.php back to the original file, I have tried editing function with in it, and I done it with products with no text inputs but I get the same error everytime. One thing that I have noticed is in the updated general.php the tep_get_uprid looks funny

 

////
// Return a product ID with attributes
 function tep_get_uprid($prid, $params) {
   $uprid = $prid;
   if ( (is_array($params)) && (!strstr($prid, '{')) ) {
     while (list($option, $value) = each($params)) {
       //CLR 030714 Add processing around $value. This is needed for text attributes.
       $uprid = $uprid . '{' . $option . '}' . htmlspecialchars(stripslashes(trim($value)), ENT_QUOTES);
     }
   //CLR 030228 Add else stmt to process product ids passed in by other routines.
   } else {
     $uprid = htmlspecialchars(stripslashes($uprid), ENT_QUOTES);
   }

   if ( (is_array($params)) && (!strstr($prid, '{')) ) {
     while (list($option, $value) = each($params)) {
       $uprid = $uprid . '{' . $option . '}' . $value;
     }
   }

   return $uprid;
 }

 

The if statement is repeated and the second one is like the original. I have tried taking that out also, but I get the same error!

 

Anyone? Please?

 

Thanks,

Ryan

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

I would try changing the function to

////
// Return a product ID with attributes
function tep_get_uprid($prid, $params) {
  $uprid = $prid;
  if ( (is_array($params)) && (!strstr($prid, '{')) ) {
    while (list($option, $value) = each($params)) {
      //CLR 030714 Add processing around $value. This is needed for text attributes.
      $value_str = (tep_not_null(stripslashes(trim($value))) ? htmlspecialchars(stripslashes(trim($value)), ENT_QUOTES) : '');
      $uprid = $uprid . '{' . $option . '}' . $value_str;
    }
  //CLR 030228 Add else stmt to process product ids passed in by other routines.
  } else {
    $uprid = htmlspecialchars(stripslashes($uprid), ENT_QUOTES);
  }

  if ( (is_array($params)) && (!strstr($prid, '{')) ) {
    while (list($option, $value) = each($params)) {
      $uprid = $uprid . '{' . $option . '}' . $value;
    }
  }

  return $uprid;
}

Hth,

Matt

Always back up before making changes.

Link to comment
Share on other sites

That didn't work, I get the same error:

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /www/f/fmabdulky/htdocs/catalog/includes/functions/general.php on line 46

 

Dang, I need this to work

 

Whats wierd is where it shows up

printorder.gif

 

I would think it would show up in the product list. Maybe I skrewed something else up?

 

This is bugging me.

Edited by ryanf

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

I stumped everyone huh? I can't figure out why the customer clicking on print order details is different than the admin clicking on the invoice.

 

Anyone?

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

All of my product options are showing as drop down select menu's. Ive tried using the product_info.php that comes in the package & it works fine - but if i modify my product_info file all options are drop downs menu's. Any ideas - ive got options as images installed if that could be the problem ?

Link to comment
Share on other sites

I aplogize everyone, I figured out this weekend that my problem is unrelated to this contribution. Now I just have to figure out how to fix it! Anyway, use this contrib its great!

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

  • 2 weeks later...

I am having problems with the text values showing up. HELP! Please...

 

I have read through this entire thread and across the whole forum and have tried most of the suggestions. Now I am getting weird errors in the order in the admin - here's a sample product:

 

1?x Little Folks Calling Card - Large

? - :

? - * Character 1 Body: TEXT

? - ~ Character 1 Hair Color: Blonde

? - + Character 1 Eyes: Dots

? - Character 1 Skin Tone: Light

? - Character 1 Age: CL- Child Large

? - :

? - :

? - ~ Character 2 Hair Color: Blonde

? - + Character 2 Eyes: Dots

? - Character 2 Skin Tone: Light

? - Character 2 Age: CM - Child Medium

 

The colons are where the text values are supposed to show up, only now they're not showing up at all, even though I entered them. And Character 1 Body is also a text value, which I entered, but now it is showing up "TEXT", as you can see above.

 

I have all the text options set to TEXT and have checked the other things suggested herein but am at a loss and pulling my hair out...HELP!!

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

 

Does anyone know if you can make comment text a link to a popup window?

 

I would like to make comment text to the right of a text field that triggers a small popup that gvies example of the different kinds of things one might want to put in the text box.

 

Can I do this with Option Type Feature?

Link to comment
Share on other sites

!!Great!!

 

Yeah something like that, but less complicated. I wouldn't need any selections being made in the popup, nor would I need an image (although I could make one).

 

So can you do the same sorta thing with just text???

 

In the admin would I just put something like:

 

java script:popupWindow('http://www.mysite.com/page.html')

 

Will OTF be able to handle that?

Link to comment
Share on other sites

Hi Rusyn,

I really can't handle something like that. As a matter of fact, the sample was not made by me, but by some programmers. I think you can link a popup from the product description, the one that you create when adding/editing a product.

thanks

far

Link to comment
Share on other sites

  • 2 weeks later...

Somebody help me please! I am very greatfull that Chandra has come up with this great contrib! I just wish i could get it to work =)

 

I have recieved no errors of any kind while installing, used winmerge to merge files, phpadmin to upload the .sql files included with v1.6

 

So my problem is, when i create the product attribute (text input) instead of getting an input box, i get a drop down box instead, i'm sure its an easy fix for some, but its beyond me. Personally i know that step 3 in the instructions kinda got me a bit lost, if anyone could explain it a little better, would be much appreciated

 

running 2.2 MS1 and option type feature v 1.6

 

Thanks in advance for any comments!

Link to comment
Share on other sites

Thanks Chandra for this great contribution!

 

I have looked through this entire forum, please forgive me if this has been answered.

 

 

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

 

I have followed the help instructions in the install file but with no success.

 

The config.php is:

 

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

define('PRODUCTS_OPTIONS_TYPE_SELECT', 1);

define('PRODUCTS_OPTIONS_TYPE_TEXT', 0);

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

 

and the option values in the db are:

 

products_options_types_id products_options_types_name language_id

Edit Delete 0 Select 1

Edit Delete 1 Text 1

Edit Delete 2 Radio 1

Edit Delete 3 Checkbox 1

 

 

What am I missing here?

 

Thanks!!!!

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