Developer forum

Forum » Development » Find the page with the cart for the current language layer

Find the page with the cart for the current language layer


Reply

Hi there,

Is there a way to find the ID / page name of the page with the Cart module for the current langauge? I have a (non-localized) template I want to use for multiple languages and want to link to the cart for that template. Right now, both the IDs and the physical page names are different so I don't have a single way to refer to the cart from multiple layers.

I found Ecom:Order:CartForm.SubmitOrder which is "close but no cigar" because it is really JavaScript and seems to contain the current page's ID, not the ID of the page with a cart.

Is this information available somewhere and if not can it be made available someday?

Kind regards.

Imar
 


Replies

 
Nicolai Høeg Pedersen
Reply
You can use this query:

SELECT PageID, PageAreaID FROM Page RIGHT JOIN Paragraph ON Page.PageID = Paragraph.ParagraphPageID WHERE Page.PageAreaID = 1 AND Paragraph.ParagraphModuleSystemName = 'eCom_CartV2' ORDER BY Paragraph.ParagraphID

It could return multiple carts if more are present on the area.

I'll add the first created cart instance of each language as a template tag.
 
Reply
Works great; thanks.....

Imar

 

You must be logged in to post in the forum