In Answer to my last question:
About the WIKI Docs
Control Structures
Function Calls
Function Definitions
Comments
http://www.zen-cart.com/wiki/index.p...pers_Standards
only its empty, I guess its a work in progress.
In Answer to my last question:
About the WIKI Docs
Control Structures
Function Calls
Function Definitions
Comments
http://www.zen-cart.com/wiki/index.p...pers_Standards
only its empty, I guess its a work in progress.
nup, I got nothen.
Well I was going to be a good samaratin and enter the details of this function to get the Wiki rolling but it wont let me register to edit its pages.
Call the current categories id from the products id:
<?php echo zen_get_products_category_id($product['id']);?>
Needs to be on a page or in a array that knows the products_id.
Last edited by maxidvd; 29 Nov 2008 at 12:38 AM.
nup, I got nothen.
Call the current categories id from the products id:
<?php
echo zen_get_products_category_id($product['id']);
?>
Needs to be on a page or in a array that knows the products_id.
nup, I got nothen.
I would like to show only the description and not the product name in the listing. I found a thread that talks about this but does not have any instructions on how to do it.
https://www.zen-cart.com/forum/showthread.php?p=285189
I am not all that great in PHP, I would appreciate any help.
Hi Eljay
In folder: zencart\includes\modules
Create a new folder in there and name it exactly the same as your current template folder.
If your using the CLASSIC template it would be this:
zencart\includes\modules\CLASSIC without the capitals of course.
Now go back to the zencart\includes\modules folder and find the file: product_listing.php
And copy that file to you new folder:
zencart\includes\modules\CLASSIC\product_listing.php
Now that its copied into the new "Template Overide Folder" you need to edit the code with a text editing program like windows notepad.. or Winsyntax
and search for ir browse lines 95 to 102 you will find this code snippet
case 'PRODUCT_LIST_NAME':
blah blah blah blah
blah blah blah blah
blah blah blah blah
}
break;
use the code below and copy over it, this will remove then product name but leave the description intack.
Sounds like a lot of work, but its better to do it right using the template override system then to just go in and hack a systemCode:/* case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($_GET['manufacturers_id'])) { $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ; } else { $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>'; } break; */ case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($_GET['manufacturers_id'])) { $lc_text = '<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ; } else { $lc_text = '<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>'; } break;
file that will make your site harder to update in the future.
Cheers Lee
nup, I got nothen.
Hi Guys,
I know this is an extremely old post but I have been stuck on this all afternoon - hopefully someone can shed some more light on this issue. Not sure if you are still around Linda...
I am looking to display the category name of each item on the shopping cart page. I have followed suggestions found here and I know this is a peculiar issue. I have been able to display master_categories_id and one would assume that displaying a name instead of the id is possible on the shopping cart page.
I just cannot figure this one out.
Linda you have been a wonderful help in this post. Thank you very much if you do happen to fly by.
Any help or suggestions would be greatly appreciated.
P.s. I am currently running the latest version of Zen Cart.
Regards,
Evan
If you have the master_categories_id, you can use the function zen_get_categories_name to display the name ...
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.1]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Thanks for your swift reply.
My beginners knowledge of php is certainly not helping me out.
Could you please tell me if I am even on the right track with something like - currently not working
This is what I am using to display the master_catergoried_id and it is working perfectly:Code:echo zen_get_categories_name($product['id'], 'master_categories_id');
Code:echo zen_products_lookup($product['id'], 'master_categories_id');
Currently working in file tpl_shopping_cart_default.php
THanks :)
You cut out the function in the second function ... try this:
Code:echo zen_get_categories_name(zen_products_lookup($product['id'], 'master_categories_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.1]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Bookmarks