Developer forum

Forum » Swift » Clicking product image on check out page delivery step and payment step lead to 404 page

Clicking product image on check out page delivery step and payment step lead to 404 page

Tan Pang Lin Dynamicweb Employee
Tan Pang Lin
Reply

Dear Support

May I know is there a way to configure the hyperlink to product detail page when clicking the product in the check out page / delivery step /  payment step (right side order summary colukn),   in cart page, (left side), it was ok.

it happens for both Guest buy and Log in buy. 

 

thanks

Pang Lin


Replies

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply

Hi Pang LIn

The links should be the same. Can you supply me with the part of the url, after the domain name, to the detail page that does not work?

 

Best regards 
Karsten Thuen

 
Tan Pang Lin Dynamicweb Employee
Tan Pang Lin
Reply

Dear Karsten

Thank you for the response.

Here are the steps that I had taken.

 

  1. Had added this item to cart, http://mfri.dynamicwebapac.com/beauty/by-category/jelly-melt-glossy-lip-tint ,
  2. go to cart page and click the product image, the URL is this, http://mfri.dynamicwebapac.com/beauty/by-category/jelly-melt-glossy-lip-tint  
  3. click "check out" button and click the product image on the right, the URL is this, http://mfri.dynamicwebapac.com/Default.aspx?ID=Default.aspx?Id=1911&ProductID=PROD221 ,  and this lead to 404 page

This solution is 2 webistes one cart.  

the 2 websites are

- http://mfri.dynamicwebapac.com/mfrib 

- http://mfri.dynamicwebapac.com/mfrif

the carat/shop is

- mfric

Thanks

Pang Lin

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply
This post has been marked as an answer

Hi Pang Lin

I have now looked at your page. And I have tried to replicate the bug on our own solution. But I could not get the same bug. I have one suggestion though. 

In the template "OrderSummaryOrderLineItem.cshtml" around line 19 to line 26 we have the link implementation. It seems it is not made the same way as in the cart, and that is a bug in Swift. You can try replacing it with this code:

 

string detailsPageLink = Pageview.CurrentParagraph.Item["ProductPageLink"] != null ? Pageview.CurrentParagraph.Item["ProductPageLink"].ToString() : "";
detailsPageLink = detailsPageLink != "" ? detailsPageLink : GetPageIdByNavigationTag("ProductDetailPage").ToString();
 
var defaultGroupId = orderline.GetString("Ecom:Order:OrderLine.PrimaryOrDefaultGroupId");
var selectedDetailPage = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(defaultGroupId)?.Meta.PrimaryPage ?? string.Empty;
 
string link = string.IsNullOrEmpty(selectedDetailPage) ? $"/Default.aspx?ID={detailsPageLink}&groupid={defaultGroupId}" : selectedDetailPage;
link += "&productid=" + productId;
link += !string.IsNullOrEmpty(variantId) ? "&variantid=" + variantId : "";
 
 
Best regards
Karsten Thuen
Votes for this answer: 1
 
Tan Pang Lin Dynamicweb Employee
Tan Pang Lin
Reply

Dear Karsten

Noted with thanks

Pang Lin

 

You must be logged in to post in the forum