Re: Docc wrote: Well syncing

Docc's picture
Offline
Getting busy with the Ubercode.
Joined: 07/03/2008
Juice: 169
Re: Docc wrote: Well syncing

Yeah im still looking for that total solution.
Anyhows, remember you also have to address the cart. If someone switches language while having a product in the cart i will not be replaced by its translation node.

Probaply will look something like this

/*
*  Replace products in cart with current language
*/
function uc_boumy_cart_item($op, &$item) {
  switch ($op) {
    case 'load':
global $language;
$node = node_load($item->nid);
$translations = translation_node_get_translations($node->tnid);
if($translations[$language->language]){
  $item->nid = $translations[$language->language]->nid;
  $item->title = $translations[$language->language]->title;
}
      break;
  }
}
i18n issues i D6/UC2 for Multilingual sites By: CpILL (150 replies) Mon, 05/11/2009 - 14:02