Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New field help in product_listing.php


cclayton

Recommended Posts

I have added a new field to the Products Table (products_duration) and I want the contents of this field to be output on the product listing page for each product. I have the data all in the Table correctly but I am not sure what changes I need to make to the index.php and the includes/modules/product_listing.php files to get the products_duration data output for each product.

 

Can someone help me? I am a bit stuck and learning all the time with this.

 

Many thanks.

 

Chris

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

Just as an update... I have done the following:

 

in includes/modules/product_listing.php I have reffered to the data:

 

<?php echo $listing['products_duration'] ?>

 

in Index.php & /Includes/index.php I have added the following:

 

$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,

'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,

'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,

'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,

'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,

'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,

'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,

'PRODUCT_LIST_DURATION' => PRODUCT_LIST_DURATION, -- -- - ADDED THIS IN

'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

 

As well as adding in:

 

case 'PRODUCT_LIST_DURATION':

$select_column_list .= 'p.products_duration, ';

break;

 

Can someone help me with what I might be doing wrong?

 

Thanks, Chris

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...