OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Changing 0.00 to display Free
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Payment Modules > Other
Phez
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
oschellas
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:
CODE
case 'PRODUCT_LIST_PRICE':
            $lc_align = 'right';
            if (tep_not_null($listing['specials_new_products_price'])) {
              $lc_text = '&nbsp;<s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>&nbsp;';
            } else {
              $lc_text = '&nbsp;' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '&nbsp;';
            }
            break;


Change to:
CODE
          case 'PRODUCT_LIST_PRICE':
            $lc_align = 'right';
            if (tep_not_null($listing['specials_new_products_price'])) {
              $lc_text = '&nbsp;<s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>&nbsp;';
            } elseif ($listing['products_price']!='0.00'){
              $lc_text = '&nbsp;' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '&nbsp;';
            } else {
            $lc_text = '&nbsp;Free';
            }
            break;
Phez
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?
oschellas
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...
Phez
QUOTE (oschellas @ May 21 2007, 10:18 AM) *
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
oschellas
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...
Phez
QUOTE (oschellas @ May 21 2007, 10:55 AM) *
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?
oschellas
Maybe this post can help you..
Phez
Fantastic Mate fixed it instantly

i honestly cant thank you enough
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.