Thanks for the details on how to do this ... it's always a great help to others ...![]()
Thanks for the details on how to do this ... it's always a great help to others ...![]()
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!]
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!
still not done yet.
I am trying to add a link to a CUSTOM_FIELD
I added right below name/description a custom field for the products category. You can see by using the link above.
I cant figure out how to link to the products category. This is where I am at:
'<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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&category_id=' . $listing->fields['category_id_name']) . '">' . ' ' . '</a>';
I figured that one out.
I changed:
'<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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&category_id=' . $listing->fields['category_id_name']) . '">' . ' ' . '</a>';
to this:
'<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $listing->fields['master_categories_id']) . '">' . $listing->fields['products_CUSTOM_FIELD'] . '</a>';
now here is a question?
How do I use the categories name instead of using a CUSTOM_FIELD that hold just that?
Any suggestions?
If you want to pull the categories_name ... you have to decide do you want to pull the name of the current categories_id categories_name or the master_categories_id categories_name ...
The difference is ...
In a Product Listing from the Categories navigation, there is a:
$current_category_id
variable for the categories_id ...
But, in a search, there isn't a $current_category_id so you would need to use the $master_categories_id ...
The function is in the functions_lookups.php file:
You might need to tweak the code a bit based on whether or not the $current_category_id exists and if not then you need to use the $master_categories_id ...Code:function zen_get_category_name($category_id, $fn_language_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!]
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!
Thanks Ajeh for all you help.
product_listing.php, located in /public_html/includes/modules/YOUR_TEMPLATE
is what i am editing, but the changes are only affecting my advanced_search_result page and not the actual product_listing page. What am i doing wrong?
figured it out.
By editing /public_html/includes/modules/YOUR_TEMPLATE/product_listing.php & adding CUSTOM_FIELDS it does change both the Product Listing Page & Advanced Search Result Page.
I had to add
p.custom_field to:
/public_html/includes/index_filters/default_filter.php
in order for the CUSTOM FIELDS to show up on Product Listing Page tho.
Next - if i should start new thread someone let me know?
How do I use use the same TEMPLATE for All Products, New Products, Specials so that the site has a consistency to it?
Thanks for posting your solution to this ...
Yes, it's time for a new thread for your new question ...![]()
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!]
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!