Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Removing The + Symbol From Product Prices?


mystifier_uk

Recommended Posts

If you take a look at this page:

 

http://www.clm-ladders.co.uk/shop/catalog/...;products_id=33

 

You will see that go to model at the bottom there is a drop down box with the different types you can buy.

 

But you will also notice that there's a (+ £347.54) after the model number.

 

Is there anyway I can remove this after the model number so it only has the model number listed?

Link to comment
Share on other sites

If you take a look at this page:

 

http://www.clm-ladders.co.uk/shop/catalog/...;products_id=33

 

You will see that go to model at the bottom there is a drop down box with the different types you can buy.

 

But you will also notice that there's a (+ £347.54) after the model number.

 

Is there anyway I can remove this after the model number so it only has the model number listed?

 

Being as nobody ever bothers to help people on here I thought I'd have a go.

 

You need to download and install the "Actual Attributes" contribution.

http://www.oscommerce.com/community/contributions,1716

 

Install "better instructions and drop in files" and then fix for checkout confirmation page.

Link to comment
Share on other sites

Being as nobody ever bothers to help people on here I thought I'd have a go.

 

And what do you base that statement on?

 

You are probably half right, as I doubt anyone reading that will ever help you.

Link to comment
Share on other sites

The quickest way to remove the + signs is with a db backup. Make a fresh backup in your admin, download it and open it in a text editor, preferably one that has a search and replace function. Then search for + and replace it with nothing. Save it with a different name, upload the backup to your backups directory and restore it. If you have messed up, you still have the original backup there.

 

When you assign attributes, just delete the + from the little box and it won't be entered.

 

 

EDIT: I have assumed with the above that you don't use a + sign with anything else, a contribution for instance. The ones you want to remove are in the products_attributes table.

Link to comment
Share on other sites

In product_info.php, find this:

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'])) .') ';

and change it to:

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'])) .') ';

Note that I haven't tested myself, it is just in my mind that it could be done there. Anyway, it gives you a pointer as to where to look, if it doesn't work.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Being as nobody ever bothers to help people on here I thought I'd have a go.

 

You need to download and install the "Actual Attributes" contribution.

http://www.oscommerce.com/community/contributions,1716

 

Install "better instructions and drop in files" and then fix for checkout confirmation page.

 

Well I certainly will be avoiding helping you (bleddy cheek)

 

Anyway @ the poster the + sign comes from TABLE products_attributes FIELD price_prefix

 

In product_info.php look for ..

 

$cost_add = ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

 

and change

 

$products_options['price_prefix']

 

to ..

 

str_replace('+', '', $products_options['price_prefix'])

 

Dirty and untried but should work.

Link to comment
Share on other sites

Thanks guys, GemRock's suggestion removed the '+' symbol, so now it looks like this:

 

Model: PV4 (£45.95)

 

Does anyone who where I can removed the actual price (£45.95) as well so I just have the model number in the drop-down box?

Link to comment
Share on other sites

Just remove ...

 

		  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'])) .') ';
	  }

Link to comment
Share on other sites

Thanks guys, GemRock's suggestion removed the '+' symbol, so now it looks like this:

...removed the actual price (£45.95) as well so I just have the model number in the drop-down box?

Sorry, I was in a hurry and did not realise you actually want to remove the whole price bit. In that case, I would suggest you comment out the line in case you change your mind at a later day and it should now look like this:

// $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'])) .') ';

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Thanks guys, GemRock's suggestion removed the '+' symbol, so now it looks like this:

...removed the actual price (£45.95) as well so I just have the model number in the drop-down box?

Sorry, I was in a hurry and did not realise you actually want to remove the whole price bit. In that case, I would suggest you comment out the line in case you change your mind at a later day and it should now look like this:

//  $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'])) .') ';

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

<BR>Thanks guys, GemRock's suggestion removed the '+' symbol, so now it looks like this:...removed the actual price <B>(£45.95)</B> as well so I just have the model number in the drop-down box?
Sorry, I was in a hurry and did not realise you actually want to remove the whole price bit. In that case, I would suggest you comment out the line in case you change your mind at a later day and it should now look like this:
//	   $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'])) .') ';

 

Ken

It is funny why it posted three times? I didn't press the Post button 3 times??? I just pressed the Tab key and the Space and then all a sudden...you see it now.

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Thanks guys, GemRock's suggestion removed the '+' symbol, so now it looks like this:

 

Model: PV4 (£45.95)

 

Does anyone who where I can removed the actual price (£45.95) as well so I just have the model number in the drop-down box?

Well, the title of your post is "Removing The + Symbol From Product Prices? ", that's what excatlly my suggestion did. So I can't be blamed can I? :rolleyes:

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...