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!
Hi, I'm trying to display product id in product listing pages.
I read this post and I tried to change 'product_listing.php' in modules, but I couldn't...
I don't know where I should change and where I can put this:
$listing->fields['products_id'];
could you give me more specific information that I could change?
thanks
Bookmarks