Skip to content

Instantly share code, notes, and snippets.

@CB9TOIIIA
Created March 16, 2017 08:43
Show Gist options
  • Save CB9TOIIIA/f1063647c7dc4afe3f0db19630b16e6a to your computer and use it in GitHub Desktop.
Save CB9TOIIIA/f1063647c7dc4afe3f0db19630b16e6a to your computer and use it in GitHub Desktop.
Get SKU JBZoo variations
// Get SKU
$CB_price = 'bbb668d1-5b7c-451a-9af1-6f8cfd3da4bc';
$CB_SKU = $this->_item->getElement($CB_price)->data()->variations;
$CB_SKU_App = $this->app->data->create($CB_SKU);
$CB_SKU = $CB_SKU_App->find('0._sku.value');
$Value_Price = $CB_SKU_App->find('0._value.value');
$CB_SKU = trim(strip_tags($CB_SKU));
$Value_Price = trim(strip_tags($Value_Price));
// Add item code to title
$doc = JFactory::getDocument();
$title = $doc->title;
$newtitle = $title . ' - ' . $CB_SKU;
// $newtitle = $title . ' - ' . $CB_SKU . ' - ' . $Value_Price . ' руб.';
$doc->setTitle($newtitle);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment