Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need a small modification, looking for a code god


Paycheck

Recommended Posts

Hi guys and gals, I have a request for a small modification to the attributes drop down box. I would like to see if anyone can take the drop down box that displays the attributes and make a default line in it that always shows first. The line would say simply something like

 

"Choose another style or size here"

 

When the drop down box opens it allows the customer to choose a modification to the existing item. Reasoning for this change:

 

Reasoning for this change:

 

I have a product that costs $100.00 it is an 8 qt pot with lid.  I want to be able to add an attribute that allows the customer to choose a different size pot, say the 17qt model that goes for $160.00.  This is a difference of $60.00.  In the attribute for this I want it to simply add $60.00 to the current product however when the attributes are listed it always wants to add the first line in the attributes drop down box on checkout.  So in essance what is happening is the customer that does not want to add the attribute of the larger pot or the $60.00 they have no way.

Always remember, we need patience, guidance and most of all understanding.

 

My Contributions

Link to comment
Share on other sites

After spending an hour on finding a fix for the same problem I was able to find a quick solution. However, I am unsure if this would break any other parts.

 

File: /catalog/product_info.php

 

Change Line 134 (oscommerce-2.2ms2)

 

 

FROM:

 

$products_options_array = array();

 

TO:

 

$products_options_array[] = array('id' => '', 'text' => 'Please Select');

Link to comment
Share on other sites

Bro you are a genious. Thank you thank you thank you.

 

It worked great and did exactly what I needed it to do. This was like having a disease that no one else had. Finally someone had the same alement that I had. Thanks a heap bro.

 

JM

 

:D

Always remember, we need patience, guidance and most of all understanding.

 

My Contributions

Link to comment
Share on other sites

I have 2 different product attribute on the same item, I have tried

$products_options_array[] = array('id' => '', 'text' => 'Please Select');, the first attribute is fine but the second will capture the first attribute and put it in the second on too. Can anyone help with the code.

 

kevin

Link to comment
Share on other sites

This is very true, I tried it and it seems to capture whatever you place in the first attribute of the product and adds it to the second one as well. Maybe a quick fix is to make all your attributes in one drop down.

 

For instance:

 

If you have a t shirt that come in large, med, small and Blue, red or green and even mens or womens.

 

Create an atribute for large, Blue Mens

Large Blue womens

 

Etc Etc.

 

Take some doing but might be a fix for the time being until someone can figure this out.

 

JM

Always remember, we need patience, guidance and most of all understanding.

 

My Contributions

Link to comment
Share on other sites

Yeah I thought about that but I have to lets the customer to choose one option, both option or none of the options. I am trying to play around with the sql statement but no luck. Hope anyone with very good knowledge with sql can help me out?

      $products_options_name = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");

 

kevin

Link to comment
Share on other sites

Not sure i understand this but ill try:

 

If the 8 qt pot with lid is $100 then leave the products price at $100 and assign it a attribute with no added $.

 

This would make it have the default 8qt pot w/lid be $100.

 

Then i would add another attribute for a 17 qt pot for a added $60 which would be avalable beneath the default 8 qt one with no additional $.

 

Would also specify in the description that we have many other sizes of the same modle/style and look below for more options.

 

This way the customers have the option for what to choose or in other words he/she has the option to stay with the first default type size of pot in the attribute list.

Also, i would make sure to specify the full difference in the attribute regarding the product, for example:

 

Red Remington 8 qt pot with Lid

Red Remington 17 qt pot with Lid +$60

Blue Remington 8 qt pot with Lid

Blue Remington 17 qt pot with Lid +$60

Special Blue & red Remington pots with lid +$100

 

First "Red Remington 8 qt pot with Lid" would be the default product being shown with description and details.

Link to comment
Share on other sites

  • 2 weeks later...

This is good but it still does not solve the issue of the first item in the attribute drop down being a null feild. It would need to say in the drop down list that you can "select more options here!" This would be the null feild and the product showing already in the current screen with aprice on it would be the one defaulting to order.

 

I ahve used the fix shown earlier but it does have side effects. If you put more than one option attribute it selects them all in the drop down list.

 

JM

Always remember, we need patience, guidance and most of all understanding.

 

My Contributions

Link to comment
Share on other sites

  • 5 months later...

I have a similar problem to yours. I what I am looking for is for the top attribute to say "Please Select" but have that attribute not a valid one so if they won't be able to continue without choosing one of the other attributes listed below that. The reason for this is so that the customer doesn't bypass the attribute part and get the wrong product delivered.

 

Peter

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...