Developer forum

Forum » Swift » OrderLineReference always empty

OrderLineReference always empty

Cátia Torego
Reply

Hi,

The field OrderLineReference is always empty in the EcomOrderLines table. Is there any parameter that can be used so when adding a product to the cart this value has the right data?

DW version 9.17.11


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

It is a relatively mixed property. It is meant to keep the link to the page where the product was added to cart. Can be the frontpage if a product is published there with add to cart option, a product list, a product detail, a page in the customer center or anything else. It is based on a number of different fallbacks

  • If the POST or GET to add to cart command contains a value in the parameter "ProductURL" that will be used
    Else if
  • If the POST or GET to add to cart command contains a value in the parameter "redirect" that will be used if it is an absolute URL, otherwise the current page will be used
    Else
  • The 'referer' header of the add to cart request will be used. This is the default.

The referer can contain no data for many reasons.

The referrer URL may be empty when the end user:

  • Enters the site URL directly in the browser address bar.
  • Visits the site using a browser-maintained bookmark.
  • Visits the site as the first page in a window or tab.
  • Switches from an HTTPS URL to an HTTP URL.
  • Switches from an HTTPS URL to a different HTTPS URL (if blocked by the referrer meta tag on the website).
  • Has security software installed (such as antivirus/firewall) that strips the referrer from all requests.
  • Is behind a proxy that strips the referrer from all requests.
  • Visits the site programmatically (e.g., using curl) without setting the referrer header (search bots).
  • The site has a referrerpolicy either on the add-to-cart link or as part of the site response headers

My guess is thsat you are probably affected by one of the 2 highlighted bullets above.

BR Nicolai

 

You must be logged in to post in the forum