Created
March 16, 2017 08:43
-
-
Save CB9TOIIIA/f1063647c7dc4afe3f0db19630b16e6a to your computer and use it in GitHub Desktop.
Get SKU JBZoo variations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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