- Posts: 3
- Thank you received: 1
Back link problem after sending a contact request
12 years 4 months ago - 12 years 4 months ago #156364
by danielo
Back link problem after sending a contact request was created by danielo
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.1
-- PHP version -- : 5..5
I encountered a problem in following situation:
-product title has special characters (e.g.: Ø)
-product alias is set without special characters
-sef urls are activated
After sending a request via the "Contact us for more information" button, I get following confirmation dialog:
Message
Your request has been sent successfully
Click here to go back to the product page
The problem is that the "Click here" link has the product title with Ø replaced by o, so if I click I get the message "Product not found".
Anyone can reproduce this error or has solution for it?
Thanks
Daniel
-- Joomla version -- : 3.1
-- PHP version -- : 5..5
I encountered a problem in following situation:
-product title has special characters (e.g.: Ø)
-product alias is set without special characters
-sef urls are activated
After sending a request via the "Contact us for more information" button, I get following confirmation dialog:
Message
Your request has been sent successfully
Click here to go back to the product page
The problem is that the "Click here" link has the product title with Ø replaced by o, so if I click I get the message "Product not found".
Anyone can reproduce this error or has solution for it?
Thanks
Daniel
Last edit: 12 years 4 months ago by danielo.
Please Log in or Create an account to join the conversation.
12 years 4 months ago #156393
by Xavier
Replied by Xavier on topic Back link problem after sending a contact request
Hi,
Generally with SEF urls what is important are the ids. the url should looks like: http:/mywebsite.com/product/15-product-name.
Are you still using IDs in the urls ?
The problem seem to come from the controller product "components/com_hikashop/controllers/product.php" function "send_email()". Thanks to try to use for testing purpose:
Instead of:
Generally with SEF urls what is important are the ids. the url should looks like: http:/mywebsite.com/product/15-product-name.
Are you still using IDs in the urls ?
The problem seem to come from the controller product "components/com_hikashop/controllers/product.php" function "send_email()". Thanks to try to use for testing purpose:
Code:
$app->enqueueMessage(JText::sprintf('CLICK_HERE_TO_GO_BACK_TO_PRODUCT',hikashop_completeLink('product&task=show&cid='.$product->product_id.'&name='.$product->product_alias.$url_itemid)));
Code:
$app->enqueueMessage(JText::sprintf('CLICK_HERE_TO_GO_BACK_TO_PRODUCT',hikashop_completeLink('product&task=show&cid='.$product->product_id.'&name='.$product->alias.$url_itemid)));
Please Log in or Create an account to join the conversation.
12 years 4 months ago #156484
by danielo
Replied by danielo on topic Back link problem after sending a contact request
Hi Xavier,
this works but I lost SEF urls so I would be http:/mywebsite.com/product/15-
I did some more investigations and found out that this problem only occurs if i use products with characteristics.
In this case the product_id (cid in the url) is the one of the variant but the alias becomes the product name(!) of the main form.
this works but I lost SEF urls so I would be http:/mywebsite.com/product/15-
I did some more investigations and found out that this problem only occurs if i use products with characteristics.
In this case the product_id (cid in the url) is the one of the variant but the alias becomes the product name(!) of the main form.
Please Log in or Create an account to join the conversation.
12 years 4 months ago - 12 years 4 months ago #156519
by danielo
Replied by danielo on topic Back link problem after sending a contact request
Okay, everything works fine after replacing
with
Code:
$app->enqueueMessage(JText::sprintf('CLICK_HERE_TO_GO_BACK_TO_PRODUCT',hikashop_completeLink('product&task=show&cid='.$product->product_id.'&name='.$product->alias.$url_itemid)));
with
Code:
if($product->product_type=='variant'){
$alias = $parentProduct->alias;
}else{
$alias = $product->alias;
}
$app->enqueueMessage(JText::sprintf('CLICK_HERE_TO_GO_BACK_TO_PRODUCT',hikashop_completeLink('product&task=show&cid='.$product->product_id.'&name='.$alias.$url_itemid)));
Last edit: 12 years 4 months ago by danielo.
The following user(s) said Thank You: Mohamed Thelji
Please Log in or Create an account to join the conversation.
Time to create page: 0.239 seconds