- Posts: 256
- Thank you received: 2
$cartProduct['PRODUCT_NAME']
- dancingkazzaf
-
Topic Author
- Offline
Less
More
8 years 2 months ago - 8 years 2 months ago #295540
by dancingkazzaf
$cartProduct['PRODUCT_NAME'] was created by dancingkazzaf
Hello I am trying to add a link to the email notification Product Name so it can link directly to the listed product on the website.
I know I need to alter this
in the preload.php file. But what do I need to add to also call in the URL of the product from the website. I have tried a few variations but without success.
Thanks
I know I need to alter this
Code:
$cartProduct['PRODUCT_NAME']
Thanks
Last edit: 8 years 2 months ago by dancingkazzaf.
Please Log in or Create an account to join the conversation.
8 years 2 months ago #295542
by nicolas
Replied by nicolas on topic $cartProduct['PRODUCT_NAME']
Hi,
By default you have that:
So you can try to change it to:
Note that you're not in the same context than when HikaShop generates the link on the listing.
First, the URL needs to be absolute in an email while it needs to be relative on a listing.
Also, you don't have the itemid available here while it is available on the listings.
So I don't guarantee you'll have the exact same link.
By default you have that:
Code:
$cartProduct['PRODUCT_NAME'] = $t;
Code:
$productClass->addAlias($product);
$link = hikashop_contentLink('product&task=show&cid=' . (int)$product->product_id . '&name=' . $product->alias, $product, false, false, false, true);
$cartProduct['PRODUCT_NAME'] = '<a href="'.$link.'">'.$t. '</a>';
First, the URL needs to be absolute in an email while it needs to be relative on a listing.
Also, you don't have the itemid available here while it is available on the listings.
So I don't guarantee you'll have the exact same link.
Please Log in or Create an account to join the conversation.
- dancingkazzaf
-
Topic Author
- Offline
Less
More
- Posts: 256
- Thank you received: 2
8 years 2 months ago #295564
by dancingkazzaf
Replied by dancingkazzaf on topic $cartProduct['PRODUCT_NAME']
Hello thats great. The URL itself wasn't to important, all I wanted it to do is link to the product page which is does.
Thanks alot!
Thanks alot!
Please Log in or Create an account to join the conversation.
Time to create page: 0.165 seconds