<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум ReadyScript &mdash; Шаблон "commoditycheck" Товарный чек]]></title>
	<link rel="self" href="https://forum.readyscript.ru/feed/atom/topic/1765/" />
	<updated>2019-04-10T11:57:16Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.readyscript.ru/topic/1765/shablon-commoditycheck-tovarnyi-chek/</id>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон "commoditycheck" Товарный чек]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/9781/#p9781" />
			<content type="html"><![CDATA[<p>Дело всё в том, что в заказе в product переменной храниться объект товара, который уже с прописанной ему ценой (OrderItem превращается в заполненный Product). И это цена в типе объекта присваивается всем ценам, т.к. товар с финальной ценой.<br />Вам нужно подгрузить этот товар снова в новую переменную, например по id.<br /></p><div class="codebox"><pre><code>{static_call var=new_product callback=[&#039;\Catalog\Model\Orm\Product&#039;, &#039;loadByWhere&#039;] params=[[&#039;id&#039; =&gt; $product.id]]}
{$new_product-&gt;getCost(&#039;Нужная цена&#039;)}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Закусило Александр]]></name>
				<uri>https://forum.readyscript.ru/user/20/</uri>
			</author>
			<updated>2019-04-10T11:57:16Z</updated>
			<id>https://forum.readyscript.ru/post/9781/#p9781</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон "commoditycheck" Товарный чек]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/9779/#p9779" />
			<content type="html"><![CDATA[<p>Вот часть содержимого &quot;{$product|print_r}&quot;</p><div class="codebox"><pre><code>Array ( [g8x3jtldma] =&gt; Array ( [product] =&gt; Catalog\Model\Orm\Product Object ( [fast_mark_offers_use:protected] =&gt; [fast_mark_multioffers_use:protected] =&gt; [fast_mark_virtual_multioffers_use:protected] =&gt; [keep_update_prod_cat:protected] =&gt; 1 [keep_spec_dirs:protected] =&gt; [cache_visible_property:protected] =&gt; [cache_amount_step:protected] =&gt; [cache_warehouse_stick:protected] =&gt; [user_cost:protected] =&gt; 98.10 [stock:protected] =&gt; [full_stock:protected] =&gt; [offer_xcost:protected] =&gt; Array ( ) [dir_alias_cache:protected] =&gt; Array ( ) [calculate_user_cost:protected] =&gt; Array ( [4] =&gt; 90.00 [5] =&gt; 140.00 [12] =&gt; 140.00 [13] =&gt; 90.00 [14] =&gt; 97.00 [15] =&gt; 108.00 [16] =&gt; 112.50 [17] =&gt; 122.00 [19] =&gt; 87.00 [20] =&gt; 92.70 [21] =&gt; 98.10 ) [files:protected] =&gt; [dimensions_object:protected] =&gt; [_values:protected] =&gt; Array ( [id] =&gt; 14576 [site_id] =&gt;</code></pre></div><p>Конкретно интерсует, как вывести число <strong>calculate_user_cost </strong>- id цены <strong>4</strong></p>]]></content>
			<author>
				<name><![CDATA[Андрей]]></name>
				<uri>https://forum.readyscript.ru/user/299/</uri>
			</author>
			<updated>2019-04-10T11:13:55Z</updated>
			<id>https://forum.readyscript.ru/post/9779/#p9779</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон "commoditycheck" Товарный чек]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/9777/#p9777" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Закусило Александр пишет:</cite><blockquote><div class="codebox"><pre><code>{$product-&gt;getCost(&#039;Название нужной цены&#039;)}</code></pre></div></blockquote></div><p>Шаблон <strong>orderform.tpl</strong></p><p> &lt;tbody&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {foreach from=$order_data.items key=n item=item}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {assign var=product value=$products[$n].product}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr data-n=&quot;{$n}&quot; class=&quot;item&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;b&gt;{$item.cartitem.title}&lt;/b&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;br&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {$multioffers_values = unserialize($item.cartitem.multioffers)}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {if !empty($multioffers_values)}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;parameters&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {$offer = array()}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {foreach $multioffers_values as $mo_value}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {$offer[] = &quot;{$mo_value.title}: {$mo_value.value}&quot;} <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {/foreach}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {implode(&#039;, &amp;nbsp; &#039;, $offer)}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {elseif !empty($item.cartitem.model)}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {t}Модель{/t}: {$item.cartitem.model}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {/if}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;{$item.cartitem.barcode}&lt;/td&gt;<br />&nbsp; &nbsp; <strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;{$item.single_cost}&lt;/td&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;{$product-&gt;getCost(&#039;Оптовая цена&#039;)}&lt;/td&gt;</strong><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;{$item.cartitem.amount}&lt;/td&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {/foreach}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tbody&gt;</p><p>Значение {$item.single_cost} и {$product-&gt;getCost(&#039;Оптовая цена&#039;)} - одинаковое выводит</p><p>Цена выводится &quot;как в заказе&quot;, в обоих случаях</p>]]></content>
			<author>
				<name><![CDATA[Андрей]]></name>
				<uri>https://forum.readyscript.ru/user/299/</uri>
			</author>
			<updated>2019-04-10T09:38:13Z</updated>
			<id>https://forum.readyscript.ru/post/9777/#p9777</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон "commoditycheck" Товарный чек]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/9729/#p9729" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>{$product-&gt;getCost(&#039;Название нужной цены&#039;)}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Закусило Александр]]></name>
				<uri>https://forum.readyscript.ru/user/20/</uri>
			</author>
			<updated>2019-04-01T07:25:03Z</updated>
			<id>https://forum.readyscript.ru/post/9729/#p9729</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Шаблон "commoditycheck" Товарный чек]]></title>
			<link rel="alternate" href="https://forum.readyscript.ru/post/9728/#p9728" />
			<content type="html"><![CDATA[<p>Здравствуйте.</p><p>Мне необходимо вывести две цены (цена по которой оформлен заказ) и отдельной колонкой другой вид цены.</p><p>Например в заказе фактическая цена продажи, а во-второй колонке базовая оптовая цена.<br />Это нужно для сборщиков заказа.</p><p>Как это сделать?</p>]]></content>
			<author>
				<name><![CDATA[Андрей]]></name>
				<uri>https://forum.readyscript.ru/user/299/</uri>
			</author>
			<updated>2019-04-01T06:14:32Z</updated>
			<id>https://forum.readyscript.ru/post/9728/#p9728</id>
		</entry>
</feed>
