<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум ReadyScript &mdash; Как вывести js с параметрами товара]]></title>
		<link>http://forum.readyscript.ru/topic/2353/kak-vyvesti-js-s-parametrami-tovara/</link>
		<atom:link href="http://forum.readyscript.ru/feed/rss/topic/2353/" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Как вывести js с параметрами товара».]]></description>
		<lastBuildDate>Mon, 24 Aug 2026 18:06:33 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Как вывести js с параметрами товара]]></title>
			<link>http://forum.readyscript.ru/post/12154/#p12154</link>
			<description><![CDATA[<p>Пока сделал в product.tpl</p><div class="codebox"><pre><code>{if $product.sku}
&lt;div class=&quot;sl-rich-content pt-3&quot;&gt;&lt;/div&gt;
{literal}
&lt;script&gt;(function(w,d,s,o){var f=d.getElementsByTagName(s)[0];var j=d.createElement(s);
....
          &quot;productId&quot;: &quot;{/literal}{$product.sku}{literal}&quot;
...
&lt;/script&gt;
{/literal}
{/if}</code></pre></div><p>Но получается достаточно топорно: скрипт располагается прям в центре html документа..</p><p>И в product.inc.php нет ни каких хуков, чтобы использовать addJs и addJsVar</p><p>Может есть какой-то нормальный вариант?</p><p>Скрипт записывает HTML-код блок div.sl-rich-content</p>]]></description>
			<author><![CDATA[null@example.com (Денис)]]></author>
			<pubDate>Mon, 24 Aug 2026 18:06:33 +0000</pubDate>
			<guid>http://forum.readyscript.ru/post/12154/#p12154</guid>
		</item>
		<item>
			<title><![CDATA[Как вывести js с параметрами товара]]></title>
			<link>http://forum.readyscript.ru/post/12153/#p12153</link>
			<description><![CDATA[<p>Добрый день!</p><p>Подскажите пожалуйста как правильно подключить/вывести скрипт на странице карточки товара, при условии если указан штрихкод? </p><p>При этом в скрипте нужна подстановка переменных $product.sku и $product-&gt;getBrand().</p>]]></description>
			<author><![CDATA[null@example.com (Денис)]]></author>
			<pubDate>Sat, 22 Aug 2026 15:56:11 +0000</pubDate>
			<guid>http://forum.readyscript.ru/post/12153/#p12153</guid>
		</item>
	</channel>
</rss>
