- Posts: 202
- Thank you received: 2
Link product names from front end order view
The order displayed on the site shows each product from the order. Is there a way to make the product name a hyperlink to that product in the store? Would be extremely helpful for customers to link back to the products they had ordered.
Thanks!
Rick
Please Log in or Create an account to join the conversation.
<?php echo $product->order_product_name.' '.$product->order_product_code;
by:
<?php if($this->invoice_type=='order' && !empty($product->product_id)){ ?>
<a class="hikashop_order_product_link" href="<?php echo hikashop::completeLink('product&task=show&cid='.$product->product_id); ?>">
<?php } ?>
<p class="hikashop_order_product_name"><?php echo $product->order_product_name; ?></p>
<p class="hikashop_order_product_code"><?php echo $product->order_product_code; ?></p>
<?php if($this->invoice_type=='order' && !empty($product->product_id)){ ?>
</a>
<?php }
That's something we will add in HikaShop
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
<?php echo $product->order_product_name.' '.$product->order_product_code;
if($this->invoice_type=='order'){ ?>
<p class="hikashop_order_product_custom_item_fields">
<?php
If(hikashop::level(2) && !empty($this->fields)){
foreach($this->fields as $field){
$namekey = $field->field_namekey;
echo '<p class="hikashop_order_item_'.$namekey.'">'.$this->fieldsClass->getFieldName($field).': '.$this->fieldsClass->show($field,$product->$namekey).'</p>';
}
}?>
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Related to this - when I view an order in the back end of the site (Sales), the order shows the products list. Is there a way I can adapt the code for this list to link the name to the actual product, displaying it in a pop-up?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The other alternative, which may be easier, would be to display the product thumbnail in the list, especially if clicking on the image can open the full-size image in a pop-up. If that would be easier, that would work just fine for me.
Please Log in or Create an account to join the conversation.
<p class="hikashop_order_item_name"><?php echo $product->order_product_name.' '.$product->order_product_code;?></p>
to:
<p class="hikashop_order_item_name">
<a class="modal" rel="{handler: 'iframe', size: {x: 760, y: 480}}" href="<?php echo hikashop::frontendLink('index.php?option=com_hikashop&ctrl=product&task=show&cid='.$product->product_id,true); ?>">
<?php echo $product->order_product_name.' '.$product->order_product_code;?>
</a>
</p>
and that will display a link with a popup of the product page on the front end
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
By the way, it works perfectly and will be a huge help. Thanks!!!!!!!!!!!!
Please Log in or Create an account to join the conversation.