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?
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?
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!
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?
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!
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?
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!
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!
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. :)
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 and $products_model !='') ?
Code:(($flag_show_product_info_model == 1) ?
Yes that is what I did.
On the file tpl_document_product_info_display.php
The code:
Was changed to:PHP Code:
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
But all I see on the product description page is the text "MODEL" and nothing appearing beside it.PHP Code:
<?php echo (($flag_show_product_info_model == 1 ) ? '<li>' . TEXT_PRODUCT_MODEL . $products_id . '</li>' : '') . "\n"; ?>
Any other advise? Perhaps I got the revision wrong?
Bookmarks