<![CDATA[ YAMS and TreasureChest - My Forums]]> https://forums.modx.com/thread/?thread=45630 <![CDATA[Re: YAMS and TreasureChest]]> https://forums.modx.com/thread/45630/yams-and-treasurechest#dis-post-263948
I’ll try this as soon as possible and will come back with results.

Thanks again.]]>
enzo2.0 Jun 25, 2011, 10:13 AM https://forums.modx.com/thread/45630/yams-and-treasurechest#dis-post-263948
<![CDATA[Re: YAMS and TreasureChest]]> https://forums.modx.com/thread/45630/yams-and-treasurechest#dis-post-263947
actually, YAMS is a module/snippet/plugin and even a chunk for mm_rules smiley but, you’re right its plugin part has to be executed before all others

now concerning Treasure Chest (which i haven’t used at all so far) if it is a snippet, you can be sure it is executed after YAMS parsing plugin.
For some other snippets as wayfinder or ditto, yams comes with its own solution work friendly with them, it’s not the case for treasure Chest

SO ? smiley well, so, yes, a solution would be to introduce YAMS to Treasure chest. The first solution that comes to my mind is, as you suggest, use Ymas inside treasure chest snippet, quite easy to realise, just add
$yams   = YAMS::GetInstance();
$langId = $yams->GetCurrentLangId();

at the very top of treasure chest snippet and then look for where it puts or parses chunks and add _$langId (or, in your case, apparently -$langId) to the chunks names in the call should do the trick

Have swing

edited : oops, Susan was faster than me smiley]]>
virtualbear Jun 24, 2011, 09:25 AM https://forums.modx.com/thread/45630/yams-and-treasurechest#dis-post-263947
<![CDATA[Re: YAMS and TreasureChest]]> https://forums.modx.com/thread/45630/yams-and-treasurechest#dis-post-263946 sottwell Jun 24, 2011, 09:20 AM https://forums.modx.com/thread/45630/yams-and-treasurechest#dis-post-263946 <![CDATA[YAMS and TreasureChest]]> https://forums.modx.com/thread/45630/yams-and-treasurechest#dis-post-263945
first many many thanks YAMS, it’s a wonderfull add-on. Respect!

I encounter a problem associating YAMS and TreasureChest to translate an e-commerce website. It seems that there is a problem of priority between those two components.

Here’s the content of the basket resource :
[!TreasureChest? &service=`cart` &cart_item_template=`cart_itemTPL-(yams_id)` &cart_wrap_template=`cart_wrapTPL-(yams_id)` &yams_id=`(yams_id)`!]

The problem is that the (yams_id) placeholder seems not to be populated with the current language ID before the TC call. One thing that I don’t understand is that the call works for the first installed language but if I change the default language, it doesn’t work.

I’ve explored the priority management in the backend, but TC is a snippet and YAMS a plugin. So you can’t choose which one need to be run first.

One thing which could be possible is to get the yams_id placeholder from the TC snippet?


Any idea.
]]>
enzo2.0 Jun 24, 2011, 07:28 AM https://forums.modx.com/thread/45630/yams-and-treasurechest#dis-post-263945