Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8927451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:13:28+00:00 2026-06-15T08:13:28+00:00

Where do I find the product class in osCommerce? I would like to modify

  • 0

Where do I find the product class in osCommerce? I would like to modify the product class to suit my needs.

I checked the classes folder at includes/classes and found the shipping class, shopping cart class, etc. but couldn’t find the product class.

These are the variables I would like to modify in the product class.

$products_price
$product_info['products_image']
$products_options
$products_options_name
$product_info

All these variables are used in pages that display products like oscommerce/product_info.php, oscommerce/product_review.php etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:13:29+00:00Added an answer on June 15, 2026 at 8:13 am

    There’s no Product class in osccomerce.

    in product_info.php all the variables are setted by a query in the product_info.php (line 75 more or less):

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

    If you need to add something to a product, just add it to the products table in mysql and modify all the php is oscommerce where you want to use it.

    For example: You need to add an ISBN field to all your products because you have an online library and you need it.

    1.- Edit your products table to add the new field:

    alter products ADD products_isbn VARCHAR(15);
    

    2.- Go to all pages in catalog that shows products and you want to show the new field and edit the products sql

    //products_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,p.products_isbn 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);
    

    (just before the from I have add p.products_isbn)

    And now you have $products_info["products_isbn"] accessible to use it.

    3.- if you want to add the fields into the products lists (categories view, search results, specials, upcoming products, newest products,…) you have to add it into the product listing catalog/includes/modules/product_listing.php (the most easy way to do it is track the products_name from catalog/index.php an dupe for the new field)

    4.- if you want to show in a box (like “other clients also buy” or the right or left columns) you have to go to catalog/include/boxes/ and add it too.

    5.- if you want to edit the new field in administration you have to edit catalog/admin/categories.php and add the new ( the easy way here is to track products_model and dupe for your new field)

    I’m sure I’m leaving more changes, because these are the minimal changes for showing the new field, if the new field has any functionality like discounts you have to edit the order class, the checkout process,….

    Yes, it’s a mess

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this part of the function : $jQ('.product-collateral .product-tabs li').each(function(index){ $jQ(this).attr('id', $jQ(this).find('h3').attr('class')); if(index
Is there a way to create a condition like this? @products = Product.find(:all, :limit
I've got a number of product classes which extend a parent product class. Each
I have the following classes: class Product < ActiveRecord::Base has_one :total_purchase end class TotalPurchase
I've got a class like this: public class Product { public int ProductId {
I am creating a search page where we can find the product by entering
I am attempting to find the closest product to the given budget $array =
We unfortunately find ourselves having to support our product in IE 6 because some
For example: class Product has_many :sales_orders def total_items_deliverable self.sales_orders.each { |so| #sum the total
I have product class named- Products.cs class Products : INotifyPropertyChanged { private int productId

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.