SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1
Topic Link problem on SilvercartProductGroupHolder 3872 Views

Link problem on SilvercartProductGroupHolder

27 June 2013 at 11:50am

Hi,

I am facing a minor problem which might be a bug.

I've created a product called "Article1" and assigned it to "Group1" and mirror group "Group2".

While browsing in the front-end to Group2 I recognized that the link to Article1 is pointing to Group1 even I am within Group2 (the link behind the image).

It seems the value for $Link within
<% control getProductsForced(6) %>
is different than outside ?

Re: Link problem on SilvercartProductGroupHolder

1 July 2013 at 7:18pm

Hi Mephisto,

thanks for pointing that out, we'll have a closer look at that.

Cheers
Ramon

Re: Link problem on SilvercartProductGroupHolder

15 July 2013 at 11:14am Last edited: 15 July 2013 11:15am

Hi Ramon,

it seems line 2017 (file SilvercartProduct.php function
Link()) is causing te problem here:

$link = $this->SilvercartProductGroup()->OriginalLink() . $this->ID . '/' . $this->title2urlSegment();


Within function Link() only pages rendered with a "SilvercartProductGroupPage_Controller" respects a mirrored product.
Without this controller ("if (empty($link) && ..") the function defaults to the code mentioned above.
I changed this line to

$link = Controller::curr()->Link() . $this->ID . '/' . $this->title2urlSegment();

and the problem seems to be solved.

Cheers
Mephisto