Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Contribution for a length option


ssgtcarroll

Recommended Posts

I sell a lot of items on my website that are sold by different lengths. I need the customer to be able to select a length on the product and then they canchange the quanity of how many peices at that length they want.

 

Is anyone doing something simular or is there a contribution out there that has this feature built in?

 

This is really messing things up I need help ASAP PLLLEEEEAAASSSEE!!!! :'(

Link to comment
Share on other sites

Why can't you just list the lengths as attributes so they appear in a drop down list and then the customer adds to basket the quantity they want?

 

 

If I do that my problem is theres other attributes that add to the price for color options. If I do for say:

 

How many Feet: 1 +0

2 + 1.50

3 + 3.00

 

Then I need to have the price of the color added on PER foot.

 

What finish: Aluminum + 0

Bronze + 1.30

 

See my problem?

 

First thing I did was made it so I could use multiplication and use the * key.

 

Problem with that is then it wont make sense to the custom it will say:

 

How many Feet: 1 (*$1.00)

2 (*$2.00)

3 (*$3.00)

 

I want it to say the actual addition in price or just not show how much it will be.

 

I did a show actualy price contribution for a while but its dumb on some products where I have like 13 options on them.

 

So if someone can suggest on how to modify the product_info.php fill to not show (*$1.00) when I use the "*" key that would be perfect.

Link to comment
Share on other sites

if ($products_options['options_values_price'] != '0') {

$products_options_array[sizeof($products_options_array)-1]['text'] .= ' ('

 

. $products_options['price_prefix']

 

. $currencies->display_price(

 

$products_options['options_values_price'],

 

tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

 

 

 

There is my print code there. I know one of the codes there prints the + & * symbol. I know VB but not php to well. How can I do:

 

If symbol = "+" or "-" then

 

(Insert above code)

 

Else

 

print just the option and no amount

 

end if

 

 

make sense?

 

NEED HELP GUYS PLLLEEEEEEAAASSEEEEE gotta be some php gurus in here.....

Link to comment
Share on other sites

you could check the

 

$products_options['price_prefix']

 

so you do

 

if( $products_options['price_prefix'] != '+' && $products_options['price_prefix'] != '-' )

// do not display

else

// normal operation

Link to comment
Share on other sites

Ok did what I wanted and your the man by the way! lol Problem is now when I add to order it doesnt do the math. I figure I need to put something in the first set of permemters... read below:

 

 

if( $products_options['price_prefix'] != '+' && $products_options['price_prefix'] != '-' ) {

 

 

(WHAT GOES HERE???)

 

 

} else {

$products_options_array[sizeof($products_options_array)-1]['text'] .= ' ('

 

. $products_options['price_prefix']

 

. $currencies->display_price(

 

$products_options['options_values_price'],

 

tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

Link to comment
Share on other sites

in the first case it goes the calculation:

 

$currencies->display_price($products_options['options_values_price']*$products_options['products_options_values_name'], tep_get_tax_rate($product_info['products_tax_class_id']))

 

but I thought you had the rest of code. You need to do a bunch of other mods in the shopping cart class, order, invoice etc. to have this showing everywhere. And you may want to apply the filtering explicitly for '*' instead.

Link to comment
Share on other sites

in the first case it goes the calculation:

 

$currencies->display_price($products_options['options_values_price']*$products_options['products_options_values_name'], tep_get_tax_rate($product_info['products_tax_class_id']))

 

but I thought you had the rest of code. You need to do a bunch of other mods in the shopping cart class, order, invoice etc. to have this showing everywhere. And you may want to apply the filtering explicitly for '*' instead.

 

 

Well it looks like the codes fine now its actualy the multiplication attribute I installed that isn't working now for some reason.

 

Thanks for the help.

Link to comment
Share on other sites

Well it looks like the codes fine now its actualy the multiplication attribute I installed that isn't working now for some reason.

 

Thanks for the help.

 

 

 

Great it seems the multiplication contribute doesnt work with the new version.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...