♥peterpil19 Posted January 20, 2017 Share Posted January 20, 2017 Hi, I would like to display more information about the products which are listed when you click on a category. Currently the products are listed displaying name, price, image, description. I have worked out that product_listing.php is the relevant file. I have not had much success trying to replicate the code which relate to product description or product name and referencing them to other product fields in the products table. $prod_list_contents .= ' <p class="group inner list-group-item-text" itemprop="description">' . strip_tags($listing['products_description'], '<br>') . '…</p><div class="clearfix"></div>'; For example, the above code displays the product description which is in the products_description table. How do I change it to display instead, say the product's weight which is in the products table? Changing 'Products_Description' to e.g. "Products_weight' in the above has no effect. Thanks, Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here Link to comment Share on other sites More sharing options...
aurelou Posted January 20, 2017 Share Posted January 20, 2017 Hello @@peterpil19, In the admin in configuration --> product listing you can enable or disable existing fields in the product listing (like weight and others).If you want extra new fields I think you have to name them in both product_listing.php and index.php Link to comment Share on other sites More sharing options...
♥peterpil19 Posted January 20, 2017 Author Share Posted January 20, 2017 Thanks, Any tips if I want to use a custom field I've added myself to the products table, do I have to define it anywhere? Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here Link to comment Share on other sites More sharing options...
♥raiwa Posted January 20, 2017 Share Posted January 20, 2017 @@peterpil19, you have to add them to the sql queries in index.php. search for: $listing_sql = "select..... About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
ecommunlimited Posted January 20, 2017 Share Posted January 20, 2017 @@peterpil19 There's an add-on for that: Extra Product Fields for osCommerce 2.3 Take care Bill Link to comment Share on other sites More sharing options...
♥peterpil19 Posted January 20, 2017 Author Share Posted January 20, 2017 @@peterpil19, you have to add them to the sql queries in index.php. search for: $listing_sql = "select..... Thank you so much! Cannot believe it was that simple. Don't know how I missed looking in index.php Perfect! @@peterpil19 There's an add-on for that: Extra Product Fields for osCommerce 2.3 Take care Bill Thanks Bill, I've added my own fields manually, which wasn't too hard, otherwise would look at that contribution. Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.