New Zenner
- Join Date:
- May 2011
- Posts:
- 10
- Plugin Contributions:
- 0
Add Category Name to Product Listing above description
Worked Perfectly - Thank you so so much!
Views: 4,865
New Zenner
Worked Perfectly - Thank you so so much!
Oba-san
You are most welcome ... thanks for the update that this is working for you ... :smile:
New Zenner
Yep Shopping Cart Page working perfectly.
tpl_checkout_confirmation_default not so well.
This seems to be a but trickier.
tpl_checkout_confirmation_default
<?php // now loop thru all products to display quantity and price ?>
<?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { ?>
<tr class="<?php echo $order->products[$i]['rowClass']; ?>">
I HAVE ADDED -->
<td class="cartSize"><?php echo zen_get_categories_name(zen_products_lookup($order->products[$i]['master_categories_id'])); ?></td>
-->
<td class="cartQuantity"><?php echo $order->products[$i]['qty']; ?> x</td>
<td class="cartProductDisplay"><?php echo $order->products[$i]['name']; ?>
<?php echo $stock_check[$i]; ?>
Any ideas.
I am pretty sure I am way off here. <-- Now that's confidence.
Thank you once again in advance.
Black Belt
You have
$order->products[$i]['master_categories_id']
when you want to look up from the product's id.
$order->products[$i]['id']
or whatever that field name is in this instance...
Oba-san
I do not believe that the master_categories_id is available from the order class ... you will need to obtain the categories_id from the products_id with a different function ...
New Zenner
Thanks guys - any suggestions on where I can start with this?
Oba-san
You can use the function:
function zen_get_categories_name_from_product($product_id) {
Tell staff why this post should be reviewed.