Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

In catalog/product_info.php

 

The requested code to change is:

<?php

} else {

$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 " . 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);

 

and change to

 

<?php

} else {

$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, p.products_availability_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);

 

___________________________________________________________________

 

My code in catalog/product_info.php page:

 

$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" . $new_fields_mo_pics . ", pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id " . $new_fields . " from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'");

$product_info = tep_db_fetch_array($product_info_query);

 

If you noticed, my code is quite different. How do I edit my part of the code to reflect the product availibility code?

 

Kitti

Posted (edited)

Then in the same catalog/product_info.php page the requested code addition is:

 

Find this code:

if (tep_not_null($product_info['products_model'])) {

$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';

} else {

$products_name = $product_info['products_name'];

}

 

 

and add this immediately after it:

 

$products_availability = $product_info['products_availability_id'];

 

$products_availability_info_query = tep_db_query("select e.products_availability_name from " . TABLE_PRODUCTS_AVAILABILITY . " e where e.products_availability_id = '" . (int)$products_availability . "' and e.language_id = '" . (int)$languages_id . "'");

 

$products_availability_info = tep_db_fetch_array($products_availability_info_query);

$products_availability_name = $products_availability_info['products_availability_name'];

 

I do not have the first code in this page anywhere. I did a search and no go. So I really don't know where to add the second code.

 

The only thing I see that even comes close in my page is:

<td colspan="2" align="left">

<span class="pageHeading"><?php echo $product_info['products_name'] . '<br />'; ?></span>

<span class="main"><?php echo (SHOW_PRODUCT_MODEL_PRODUCT_INFO =='1' ? PRODUCT_MODEL . ' ' . $product_info['products_model'] . '<br />' : ''); ?></span>

<span class="main3"><?php echo PRODUCT_WEIGHT . ' ' . $product_info['products_weight'] . '<br />'; ?></span>

<?php include(DIR_WS_INCLUDES . 'products_price_table_retail.php'); ?></td>

 

Kitti

Edited by kittidid

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...