-1
でJSONでのHTMLテキストの解析エラーが私のjsバイオリンと私はこれまでのところ、私はこれらの文字に私のjavascriptのファイルIにJavascriptがここでの位置のx
$datas[] = ['attributes' => [$colorId => ['id' => $child->getColor(),
'name' => $product->getName(),
'productId' => $product->getId(),
'price' => number_format($product->getSpecialPrice(),2),
'rrp' => number_format($product->getMsrp(), 2),
'was' => number_format($product->getPrice(), 2),
'image' => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $child->getImage(),
'size' => $child->getSize(),
'description' =>Mage::helper('core')->quoteEscape(htmlspecialchars(json_encode($product->getDescription()), ENT_COMPAT, 'UTF-8', false)),
// Mage::helper('core')->quoteEscape($product->getDescription()),
'promo' => Mage::helper('core')->quoteEscape($product->getProductpromobox()),
'sku' => $product->getSku(),
'netsuite' => $product->getInternalId()
],
$sizeId => ['id' => $child->getSize(),
'name' => $product->getName(),
'productId' => $product->getId(),
'price' => number_format($product->getSpecialPrice(),2),
'rrp' => number_format($product->getMsrp(), 2),
'was' => number_format($product->getPrice(), 2),
'image' => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $child->getImage(),
'color' => $child->getColor(),
'description' => Mage::helper('core')->quoteEscape(json_encode(utf8_encode($product->getDescription()), ENT_COMPAT, 'UTF-8', false)),
// Mage::helper('core')->quoteEscape($product->getDescription()),
'promo' => Mage::helper('core')->quoteEscape($product->getProductpromobox()),
'sku' => $product->getSku(),
'netsuite' => $product->getInternalId()]
]];
を脱出しようとしたPHPコードを脱出しようとしてテキストです含めないでください https://jsfiddle.net/tsjfkwto/
関連:http://stackoverflow.com/questions/23740548/how-to-pass-variables-and-data-from-php-to-javascript/ –