Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Prefix Alteration


jack_frost

Recommended Posts

Posted

Hi!

 

I have a product that costs 1.5 dollars

 

I give the customer tree choices:

 

1 Piece

10 Pieces

25 Pieces

 

the price for 10 is 12 dollars and the price for 25 is 25 dollars.

 

with the prefix i can do this, by making the options as so:

 

1 Piece

10 Pieces (+10,5$)

25 Pieces (+23,5$)

 

I think this looks a little stupid, what i really want is for it to say this:

 

1 Piece

10 Pieces (=12$)

25 Pieces (=25$)

 

But this Prefix is not available.

 

Is there anyone who can help make the change so that this third prefix is an option?.

 

Best Regards

 

- Jack

Posted

Hello

If you look in your product_info.php for the following block

 

<?php
 	$products_options_name_query = 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='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
 	while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
   	$products_options_array = array();
   	$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 . "'");
   	while ($products_options = tep_db_fetch_array($products_options_query)) {
     	$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
     	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'])) .') ';
     	}
   	}

   	if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
     	$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
   	} else {
     	$selected_attribute = false;
   	}
?>

 

and change to

 

<?php
 	$products_options_name_query = 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='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
 	while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
   	$products_options_array = array();
   	$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 pa.attribute_sort");
   	while ($products_options = tep_db_fetch_array($products_options_query)) {
     	$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
     	if ($products_options['options_values_price'] != '0') {
       	$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . '=' . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
     	}
   	}

   	if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
     	$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
   	} else {
     	$selected_attribute = false;
   	}
?>

 

 

That will change it to an = for good,

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted

Thinking about this, if you add the "=" then clients will think that this is the price they pay, but its not as the original cost is added to the price so it might be a bit misleading.

Perhaps a Qty break mod would suit this better?

Nic

 

 

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted

Thinking about this, if you add the "=" then clients will think that this is the price they pay, but its not as the original cost is added to the price so it might be a bit misleading.

Perhaps a Qty break mod would suit this better?

Nic

 

Hi!

 

I think you misunderstood.

 

What i want is not simple to change the "+" to a "="

what i want is a third prefix, that doesnt add the original cost.

 

so that 25 Pieces (=25$)

 

actually costs 25$, not 25$ plus 1,5$

Posted

Hi!

 

I think you misunderstood.

 

What i want is not simple to change the "+" to a "="

what i want is a third prefix, that doesnt add the original cost.

 

so that 25 Pieces (=25$)

 

actually costs 25$, not 25$ plus 1,5$

 

 

ah yes i did, have you searched the add ons section?

Pretty sure there is something like that there.

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted

ah yes i did, have you searched the add ons section?

Pretty sure there is something like that there.

Nic

 

Hi Nic!

 

All i can find is Multiply prefix add ons!.

 

ive tried searching but with no luck :(

Posted

Hi,

 

Have not tried it myself yet, but take a look HERE

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

Hi,

 

Have not tried it myself yet, but take a look HERE

 

Thanks

 

 

Hi

 

This is sort of what i want, just a really complicated version.

 

In lack of other solusions, i guess it will make due.

 

If anyone knows a prefix alteration that could work, please dont hold back :)

Posted

Hi

 

This is sort of what i want, just a really complicated version.

 

In lack of other solusions, i guess it will make due.

 

If anyone knows a prefix alteration that could work, please dont hold back :)

 

What Mort-lemur said, is the correct solution to your issue, since it does exactly what you want: Quantity price breaks

 

However, if you want to have this via attributes, there is a addon called "actual attribute price" hat will display the final price (ie 20) instead off the added price (ie +18,5). Doing this you will not have a correct stock counting, because everything will go to the cart with a quantity of 1

 

I would go with QPBPP

Posted

What Mort-lemur said, is the correct solution to your issue, since it does exactly what you want: Quantity price breaks

 

However, if you want to have this via attributes, there is a addon called "actual attribute price" hat will display the final price (ie 20) instead off the added price (ie +18,5). Doing this you will not have a correct stock counting, because everything will go to the cart with a quantity of 1

 

I would go with QPBPP

 

Hi!

 

We have an physical store, that shares stock with the webshop, so wether the stock is accurate or not doesnt matter, on our webshop the products is either in stock or not. :D

 

This Actual attribute Price addon sounds more like what i want. but will it replace the "+" prefix?. because i use this as well

Archived

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

×
×
  • Create New...