Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

what does the php code look like for retrieving price info


Recommended Posts

I'd like to know what the php code looks like for displaying pricing on any of the pages where it appears. Does it involve $price? I realize this comes from the oscommerce database--I'd like to be able to recognize it when I see it, and also be able to write some code to include pricing elsewhere.

Link to comment
Share on other sites

It will have different query names but this is from product_info.php

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);

This is for the price:


this tells the code that the p. means TABLE_PRODUCTS:


My Contributions


Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

Thanks, for answering. I wish I understood this better. I can see the p.products_price on the pages where the price currently appears, but I'm not sure how it appears on the page. Echo is supposed to do that right? or display_? I'm really quite new at this, and am trying to figure out how this php works.

Link to comment
Share on other sites


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

  • Create New...