Customer contact email gives an invalid link

  • Posts: 24
  • Thank you received: 0
11 years 3 days ago #170412

-- url of the page with the problem -- : www.bros.is
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.0
-- PHP version -- : 5.5.16
-- Error-message(debug-mod must be tuned on) -- : 404

Hello.

We're having a problem with our user contact emails. The link to the product in the email is wrong.

This is the link it gives:
www.bros.is/product&task=show&cid%5B%5D=723&Itemid=147

This is what the link should be:
www.bros.is/vorulisti/product/723-bolur-value-weight

I've looked in the 'A contact request has been made' file under System - Emails and found this line:
$front_product_url = hikashop_frontendLink('product&task=show&cid[]='.$data->product->product_id.$url_itemid);

Can I change this line to get the right link?

Edit: Never mind. I changed the line to use Canonical URLs.

Last edit: 11 years 3 days ago by KleanZlate. Reason: Fixed the issue

Please Log in or Create an account to join the conversation.

  • Posts: 84301
  • Thank you received: 13697
  • MODERATOR
11 years 2 days ago #170425

Hi,

That line should be replaced by the code:

$productClass = hikashop_get('class.product');
$productClass->addAlias($data->product);
$front_product_url = hikashop_frontendLink('index.php?option=com_hikashop&ctrl=product&task=show&cid='.$data->product->product_id.'&name='.$data->product->alias.$url_itemid);

Please Log in or Create an account to join the conversation.

Time to create page: 0.045 seconds
Powered by Kunena Forum