weird product link from cart

  • Posts: 154
  • Thank you received: 4
12 years 1 month ago #66080

hi there, when i click on a product in category view the link that is being created is like this:

/online-shop/produkt/9-productname

but when this product has been added to the cart, and i am in the cart, clicking on the name of the product, the link is a different one and thus brakes my layout:

/warenkorb/produkt/cid-9

why does this happen and how can i prevent this from happening?

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

  • Posts: 12953
  • Thank you received: 1778
12 years 1 month ago #66171

Hi, can you give me a link to your website ?

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

  • Posts: 154
  • Thank you received: 4
12 years 1 month ago #66180

hi mohamed, thanks for the answer. as the website is still under construction, i can certainly send you a link via PM if you are part of the hikari-team. is this ok?

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

  • Posts: 12953
  • Thank you received: 1778
12 years 1 month ago #66183

Sure :).

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

  • Posts: 154
  • Thank you received: 4
12 years 1 month ago #66184

ok, i just send you the link. thanks again for looking into it

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

  • Posts: 12953
  • Thank you received: 1778
12 years 1 month ago #66211

Hi,
I found out where the problem was coming from and you'll just have to :
- Edit the "Cart" file of the "Checkout" view of the front-end template that you are currently using through "Hikashop->Display->View"
- replace the lines :

?>
                  <a href="<?php echo hikashop_completeLink('product&task=show&cid='.$row->product_id.$url_itemid);?>" >
By this lines :
$app =& JFactory::getApplication();
                    if(method_exists($app,'stringURLSafe')){
                      $product_alias = $app->stringURLSafe(strip_tags($row->product_name));
                    }else{
                      $product_alias = JFilterOutput::stringURLSafe(strip_tags($row->product_name));
                    }
                    ?>
                  <a href="<?php echo hikashop_completeLink('product&task=show&cid='.$row->product_id.'&name='.$product_alias.$url_itemid);?>" >
If you want me to do it for you, you can send me a temporary back-end access by PM

The following user(s) said Thank You: olivnewton

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

  • Posts: 154
  • Thank you received: 4
12 years 1 month ago #66222

thank you. i did that but it does work partially...
the last part of the link with the product id is fixed, but:
i just realised also that the link to checkout is different

all hikashop-urls start with
/online-shop/
but the cart/checkout urls start with
/warenkorb/

and when i click on the product from cart/checkout it adds still /warenkorb/ to the url instead of /online-shop/ :
so insted of having /online-shop/produkt/9-productname
i get now /warnekorb/produkt/9-productname
...which agains breaks the layout

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 1 month ago #66353

Then change the code:
$url_itemid
in the code of Mohamed to:
'&Itemid=XXX'

where XXX is the id of the menu online-shop and it will display the link you want.

The following user(s) said Thank You: olivnewton

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

  • Posts: 154
  • Thank you received: 4
12 years 1 month ago #66360

guys, you rule! never had a better support with a joomla extension in the last 8 years!
working now, thanks

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

Time to create page: 0.083 seconds
Powered by Kunena Forum