Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jun 2008
    Posts
    255
    Plugin Contributions
    0

    Default Showing product ID number

    Hi,

    Is there a way to show the product's ID number on the product listing? or else have the model # automatically count like the ID number?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Showing product ID number

    You could customize the product_listing.php module and add the products_id where you want to see it with the:
    $listing->fields['products_id']
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jun 2008
    Posts
    255
    Plugin Contributions
    0

    Default Re: Showing product ID number

    Hello Alej,

    Thanks for the advice.

    I pulled up the products_listing.php under includes/modules and thought it would be easier to replace the 'products_model' into 'products_id' on line 93 where:

    switch ($column_list[$col]) {
    case 'PRODUCT_LIST_MODEL':
    $lc_align = '';
    $lc_text = $listing->fields['products_id']; <<--this is where I replaced it.
    break;

    Turned 'model no' on under the product listing admin but it does not show up on the product info.

    I must be replacing it in the wrong place??

    Any pointers please?

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Showing product ID number

    Works fine for me ...

    What does show in that column?

    NOTE: You should use the templates and overrides:
    /includes/modules/your_template_dir/product_listing.php
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jun 2008
    Posts
    255
    Plugin Contributions
    0

    Default Re: Showing product ID number

    Yes, the changes were made on the modules/mytemplate.

    Now it shows the Model. without the products_id number.

    I went to tpl_document_products_display_info and changed:

    <!--bof Product details list -->

    <?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>

    <ul id="productDetailsList" class="floatingBox back">

    <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>


    TO

    <?php if ( (($flag_show_product_info_model == 1 ) or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>

    <ul id="productDetailsList" class="floatingBox back">

    <?php echo (($flag_show_product_info_model == 1 ) ? '<li>' . TEXT_PRODUCT_MODEL . $products_id . '</li>' : '') . "\n"; ?>

    Removing the "and $products_model != '') clause and adding products_id where $products_model is.

    Now it shows the title "Model no:" without any number on it.

    Is there some other file I need to be tinkering with?

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Showing product ID number

    I made no other changes to the product_listing.php to make mine show ...

    I cannot pinpoint why your changes are not working ...

    If you look at the file on the server that you uploaded, do you see the changes in it?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Showing product ID number

    As a test, change it to:
    $lc_text = $listing->fields['products_id'] . 'fred was here';

    Does Fred show up?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Jun 2008
    Posts
    255
    Plugin Contributions
    0

    Default Re: Showing product ID number

    I just realized that the product ID was showing up on the product listing! Sorry about that!

    However, what I really wanted was for it to show up on the individual product description not the listing.

    I sell lots of products and some have the same title with different artists. It has come to a point where if the customer references a title, I would have to ask which artist? It would be better to ask which Model No. aka Product ID. Since I have not put in the model number from the start, it would be easier to just reference the automatic numbering system that the product ID has.

    Sorry about that, hope you can advise me on this. :)

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Showing product ID number

    Code:
    (($flag_show_product_info_model == 1 and $products_model !='') ?
    This tests for the model field not being empty before displaying it. There needs to be something in that database field. Alternatively, you can remove the test for the field and just test for the flag:
    Code:
    (($flag_show_product_info_model == 1) ?

  10. #10
    Join Date
    Jun 2008
    Posts
    255
    Plugin Contributions
    0

    Default Re: Showing product ID number

    Yes that is what I did.

    On the file tpl_document_product_info_display.php

    The code:
    PHP Code:
    <?php echo (($flag_show_product_info_model == and $products_model !='') ? '<li>' TEXT_PRODUCT_MODEL $products_model '</li>' '') . "\n"?>
    Was changed to:
    PHP Code:
    <?php echo (($flag_show_product_info_model == ) ? '<li>' TEXT_PRODUCT_MODEL $products_id '</li>' '') . "\n"?>
    But all I see on the product description page is the text "MODEL" and nothing appearing beside it.

    Any other advise? Perhaps I got the revision wrong?



    Quote Originally Posted by gjh42 View Post
    Code:
    (($flag_show_product_info_model == 1 and $products_model !='') ?
    This tests for the model field not being empty before displaying it. There needs to be something in that database field. Alternatively, you can remove the test for the field and just test for the flag:
    Code:
    (($flag_show_product_info_model == 1) ?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Product ID number not showing on invoice
    By RobvdPool in forum Managing Customers and Orders
    Replies: 14
    Last Post: 11 Apr 2012, 05:42 PM
  2. Showing Total Number of Product Listed
    By yosemirza in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 22 Jan 2010, 09:45 AM
  3. Product number showing on checkout email
    By JimmyV in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 31 Aug 2009, 06:16 PM
  4. Featured Product Listing - not showing model number
    By guerrilladigital in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Oct 2008, 04:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR