Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing 0.00 to display Free


Guest

Recommended Posts

hello guys im reletavly new to using OSC

ive managed to build a site (tho its not 100% )

 

 

http://www.bdtmobiles.co.uk

 

what im wondering is how i can change the contract phones to display the word Free instead of 0.00

 

any help would be greatly apreciated

Link to comment
Share on other sites

You could change the listing output in catalog/includes/modules/

new_products.php

product_listing.php

upcoming_products.php

 

for example in product_listing.php:

case 'PRODUCT_LIST_PRICE':
		$lc_align = 'right';
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $lc_text = ' <s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		} else {
		  $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
		}
		break;

 

Change to:

		  case 'PRODUCT_LIST_PRICE':
		$lc_align = 'right';
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $lc_text = ' <s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		} elseif ($listing['products_price']!='0.00'){
		  $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
		} else {
		$lc_text = ' Free';
		}
		break;

Link to comment
Share on other sites

ok i edited product listing and that worked when you visit contracts so thanks now one more issue how can i tell the site to display certain products on the main page?

Link to comment
Share on other sites

By altering the query before you call the results. You would have to be more specific where you want to display an altered result since the are various queries and result calls...

Link to comment
Share on other sites

By altering the query before you call the results. You would have to be more specific where you want to display an altered result since the are various queries and result calls...

not sure i follow :S

 

maybe im stupid is there not a module that you can tell it what to display on the main page?

 

basicaly i want to be able to select specific items to display on the page

Link to comment
Share on other sites

You are already using a different system for your default page, featured products. The stock OSC loads by default the new products on this page. If you installed a featured products contribution it would be controllable through the admin which products to show...

Link to comment
Share on other sites

You are already using a different system for your default page, featured products. The stock OSC loads by default the new products on this page. If you installed a featured products contribution it would be controllable through the admin which products to show...

 

 

ok now i think i seriously screwed something up i downloaded and used the Featured Products contrib from the osc contrib section

 

and i get this error when i click on Featured Products in the admin panel

 

Featured Products

 

Products Status Action

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select p.products_id, pd.products_name, s.featured_id, s.featured_date_added, s.featured_last_modified, s.expires_date, s.date_status_change, s.status from products p, featured s, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id order by pd.products_name limit -20, 20

 

[TEP STOP]

 

 

any ideas on a fix?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...