Jump to content
Sign in to follow this  
ConteZero

[CONTRIBUTION] - Attributes option type selection v.2.0

Recommended Posts

Yes... product_info.php would be the first place I would begin.

 

Did you do the updates for this contrib manually, or do you have a compare program that allows you to compare the contents of two like files? The reason why I ask is because there are alot of little code changes to be made and its easy to miss something. Go back and verify all of the changes that you made.

 

If you continue to have problems, let me know.

 

Good Luck.

 

-R


"Courage is not the absence of fear, but the awareness of fear and the ability to get past it."

 

It's difficult to diagnose an issue when the patient says, "I have this pain right here Doc, what do you think it is?"

Share this post


Link to post
Share on other sites

I used winmerge to compare the files- I did notice that in product_info.php there was a <b> missing from the radio button 'products_options_name' so I added that. I re-compared each file again for changes/differences and and other than order.php having some diffs, (my version is 1.32 which has "

$tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . $customer_id . "' and ab.address_book_id = '" . ($this->content_type == 'virtual' ? $billto : $sendto) . "'");

     $tax_address = tep_db_fetch_array($tax_address_query);

)

The file supplied with the contribution does not have this,

also when I view source on the ouput, i see (checked name ="id[]"), should there be a value in the id[]?

I will keep checking for other changes.

Thank you for your help,

Brad

Share this post


Link to post
Share on other sites

Try this piece of code:

 

       case '3' :  // radio

       $selected = 0;

       $products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.collegamento from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "' and pa.options_type_id = 3 order by pa.attribute_order");

       echo '<tr><td class="main">' . $products_options_name_values['products_options_name'] . ':</td><td> </td></tr>' . "n";

       while ($products_options_values = tep_db_fetch_array($products_options)) {

         $linked_attrib = tep_linked_attributes($products_options_values['collegamento'],$HTTP_GET_VARS['products_id']);

         if (strchr($products_options_values['price_prefix'],'s')) {

           $special_class = 'productSpecialPrice';

         } else {

           $special_class = 'main';

         }

         echo '<tr><td class="' . $special_class . '">  ' . $products_options_values['products_options_values_name'];

         if (($products_options_values['options_values_price'] != '0') && (!strchr($products_options_values['price_prefix'],'i'))) {

           echo ' (' . tep_prefix_view($products_options_values['price_prefix']) . ' '. $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

         }

         echo '</td><td><input type="radio"';

         if (!$selected) {

          if (strchr($HTTP_GET_VARS['products_id'],'{')) {

           $option_value_checked = split('[{}]',$HTTP_GET_VARS['products_id']);

           $contatore_check = floor((sizeof($option_value_checked))/2);

           for ($ciclo_check=1;$ciclo_check<=$contatore_check;$ciclo_check++) {

            if (($option_value_checked[($ciclo_check*2)-1] == $products_options_name_values['products_options_id']) && ($option_value_checked[$ciclo_check*2] == $products_options_values['products_options_values_id'])) {

             $selected = 1;

             echo ' checked';

            }

           }

          } else {

           $selected = 1;

           echo ' checked';

          }

         }

         echo ' name ="' . $products_options_name_values['products_options_id'] . '" value="{' . $products_options_name_values['products_options_id'] . '}' . $products_options_values['products_options_values_id'] . $linked_attrib . '"></td></tr>' . "n";

       }

       break;

 

more notably, this line:

 

          echo ' name ="' . $products_options_name_values['products_options_id'] . '" value="{' . $products_options_name_values['products_options_id'] . '}' . $products_options_values['products_options_values_id'] . $linked_attrib . '"></td></tr>' . "n";

 

It works, but wont pass the values onto the shopping cart.

 

Help.

Share this post


Link to post
Share on other sites

Does this contribution deal with selecting multiple options from a drop down list or only with radio buttons and check boxes?

 

Thanks,

 

Richard

Share this post


Link to post
Share on other sites

osCommerce already allows you to use SELECT (drop down lists) boxes with attributes. It is the default behavior. No contribution needed.

 

Hth,

Matt

Share this post


Link to post
Share on other sites

Hello all, thanks for the good posts.

 

I am looking to have my attributes listed in a tabular format, with quantity options for each attribute. For example, if i am selling T-Shirts, i want to have "Color" and "Size" listed out, with a quantity option for each.

 

----------------------------------------------------

ORDER FORM - (Quantity by Size & Color)

 

S___M____L____XL

[----] [----] [----] [----]: Red

[----] [----] [----] [----]: White

[----] [----] [----] [----]: Blue

 

[ ADD TO CART ]

----------------------------------------------------

 

* [----] = form field for quantity.

 

----------------------------------------------------

 

 

In this fashion, a customer can choose a T-Shirt style and than submit the entire order (for color and size) with the click of a single button. As opposed to setting one order, than going back, inputting another, than going back, ..., than going back...

Thanks all,

dale

Share this post


Link to post
Share on other sites
Hello all, thanks for the good posts.

 

I am looking to have my attributes listed in a tabular format, with quantity options for each attribute. For example, if i am selling T-Shirts, i want to have "Color" and "Size" listed out, with a quantity option for each.

 

----------------------------------------------------

ORDER FORM - (Quantity by Size & Color)

 

S___M____L____XL

[----] [----] [----] [----]: Red

[----] [----] [----] [----]: White

[----] [----] [----] [----]: Blue

 

[ ADD TO CART ]

----------------------------------------------------

 

* [----] = form field for quantity.

 

----------------------------------------------------

In this fashion, a customer can choose a T-Shirt style and than submit the entire order (for color and size) with the click of a single button. As opposed to setting one order, than going back, inputting another, than going back, ..., than going back...

Thanks all,

dale

 

 

I know its been long for this post, but did you found any contribution that does that. I really need similar functionality.

Share this post


Link to post
Share on other sites

Bringing this up from the pits of hell but I need some help.

 

Scenario:

I have three text inputs one of them needs to have a 100 char limit

the other two field need a 50 char limit. Right now it defaults to 32 char for all text fields.

 

Question:

Where do I edit the char limits? Can I edit the amount of characters right in the attributes controller?

 

Any help would be greatly appreciated.

 

Thanks in advance.

Edited by PropioWeb

Samuel Mateo, Jr.

osC 2.2 MS2

Installed Mods:

WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket

Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE

Share this post


Link to post
Share on other sites

i would like to know if it posible to customise a product and calculate the price using the text option.

 

for example

 

if i was selling a t-shirt with the option to have the persons name printed on it, and i was charging ?1 per letter on top of the cost of the tshirt.

 

so there would be a text box option so when you type in the name the price next to the text box would increace by ?1.00 per letter typed.

 

-------------

 

T-shirt = ?10

 

option:

 

Name [ Craig ] (5 letters) = ?5.00

 

--------------

 

cheers

Share this post


Link to post
Share on other sites

I installed this contrib NO problem!!!

 

I was wondering if there was a way to add a weight value to the attributes? Like if you add product x, then the weight increase by.03?

 

thanx

2dogrc

Share this post


Link to post
Share on other sites

I got almost all running smoothly! I have text boxes showing up, and can enter text. The entered text does not show up in the shopping cart. I know the instructions say something about add ing a field to some table, but my php is limited. I know I have to use phpMyadmin but not sure how!

Any help would be great!

Share this post


Link to post
Share on other sites

1) backup your database

 

2) In phpMyAdmin, there is an "SQL" tab after you've selected your database. Click "SQL", enter in the SQL text, and Go / Apply / whatever the button says.

 

That's it!

 

-jared

Share this post


Link to post
Share on other sites

I don't mean to sound discouraging on purpose, but it looks like this contrib was never updated for 2.2 MS2. Unless you're running 2.2 MS1, you're likely to have problems with it.

 

-jared

Edited by jcall

Share this post


Link to post
Share on other sites
Got it running!!

 

Hiya,

 

Wonder if you can help please?!

 

I am having exactly the same problem as you did with the Option Type add-on for OS. I have text boxes that users can enter text in, but when it comes to checkout, the text does not appear.

 

Can you please let me know how you got this working please?

 

Kind Regards, Paul.

Share this post


Link to post
Share on other sites

is there an updated version of this for ms2? This is EXACTLY what I've been searching for but it doesnt seem to work with ms2. I get this error as soon as my browser hits the store:

 

Fatal error: Call to undefined function: tep_output_string()in /var/www/shirts/catalog/includes/functions/html_output.php on line 81

 

 

My php skills are more or less non-existent at this point. I'm assuming it has something to do with a database refference, but I really have no idea. ANY help would be greatlu appreciated - I really want my attributes to be displayed with checkboxes instead of the default dropdowns.

 

Cheers

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  

×