Loading...

Displaying manufacturer name on a product details page

We no longer maintain the Knowledge Base since version 4.3.x. All the latest user and developer documentation for 4.3.x and newer versions is now available at docs.cs-cart.com.

  • This article is available only for CS-Cart versions:
  • 1.3.5
  1. Open the fn_catalog.php file located in the core directory of your CS-Cart installation.
  2. Find and replace this part of the code:
    // Add product prices with taxes and without taxes
        if (!empty($product) && @$settings['Appearance']['show_prices_taxed_clean'] == 'Y') {
            $tx_prices = fn_get_taxed_and_clean_prices($product);
            if (!empty($tx_prices)) {
                $product = fn_array_merge($product, $tx_prices);
            }
        }
        
        $function = __FUNCTION__;
        include CORE_DIR . 'addons_inheritance.php';

    with this one:
    // Add product prices with taxes and without taxes
        if (!empty($product) && @$settings['Appearance']['show_prices_taxed_clean'] == 'Y') {
            $tx_prices = fn_get_taxed_and_clean_prices($product);
            if (!empty($tx_prices)) {
                $product = fn_array_merge($product, $tx_prices);
            }
        }
    
    $product['manufacturer'] = fn_get_manufacturer_data($product['manufacturer_id'], $cart_language);
    $product['manufacturer_name']=$product['manufacturer']['manufacturer'];
        
        $function = __FUNCTION__;
        include CORE_DIR . 'addons_inheritance.php';
  3. Save the file.
  4. Open the product_details.tpl file located in the skins/[CUSTOMER_ACTIVE_SKIN]/customer/products_pages directory of your CS-Cart installation, where [CUSTOMER_ACTIVE_SKIN] is an active skin of your storefront.
  5. Add the following part of the code:
    {if $product.manufacturer}
    <div ><b>{$lang.manufacturer}</b>:&nbsp;{$product.manufacturer.manufacturer}</div>
    {/if}

    below, for example, this one:
    <div class="product-image">
        {include file="common_templates/image.tpl" show_detailed_link="Y" obj_id=$product.product_id images=$product.main_pair object_type="product"}</div>
  6. Save the file.
If you would like to display a manufacturer name on a product list pages also:
  1. Open the search_products.php file located in the include/common directory of your CS-Cart installation.
  2. Find and replace this line of the code:
    $fields = "products.product_id, descr1.product as product, products.tracking, products.feature_comparison, products.zero_price_action, products.product_type";

    with this one:
    $fields = "products.product_id, products.manufacturer_id, descr1.product as product, products.tracking, products.feature_comparison, products.zero_price_action, products.product_type";
  3. Save the file.
  4. Add this part of the code:
    {if $product.manufacturer}
    <div ><b>{$lang.manufacturer}</b>:&nbsp;{$product.manufacturer.manufacturer}</div>
    {/if}

    to the appropriate places of the products.tpl, products_advanced.tpl and products_multicolumns.tpl files located in the skins/[CUSTOMER_ACTIVE_SKIN]/customer/products_pages directory of your CS-Cart installation.
Home / Knowledge base / Look and feel (design) / Manufacturers / Displaying manufacturer name on a product details page