{hook name="products:product_data_content"} {if $product.tracking == "ProductTracking::TRACK_WITH_OPTIONS"|enum} {assign var="out_of_stock_text" value=__("text_combination_out_of_stock")} {else} {assign var="out_of_stock_text" value=__("text_out_of_stock")} {/if} {if ($product.price|floatval || $product.zero_price_action == "P" || $product.zero_price_action == "A" || (!$product.price|floatval && $product.zero_price_action == "R")) && !($settings.Checkout.allow_anonymous_shopping == "hide_price_and_add_to_cart" && !$auth.user_id)} {assign var="show_price_values" value=true} {else} {assign var="show_price_values" value=false} {/if} {capture name="show_price_values"}{$show_price_values}{/capture} {assign var="cart_button_exists" value=false} {assign var="show_qty" value=$show_qty|default:true} {assign var="obj_id" value=$obj_id|default:$product.product_id} {assign var="product_amount" value=$product.inventory_amount|default:$product.amount} {assign var="show_sku_label" value=$show_sku_label|default:true} {assign var="show_amount_label" value=$show_amount_label|default:true} {if !$config.tweaks.disable_dhtml && !$no_ajax} {assign var="is_ajax" value=true} {/if} {capture name="form_open_`$obj_id`"} {if !$hide_form}
{if !$stay_in_cart} {/if} {/if} {/capture} {if $no_capture} {assign var="capture_name" value="form_open_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="name_`$obj_id`"} {hook name="products:product_name"} {if $show_name} {if $hide_links}{else}{/if}{$product.product nofilter}{if $hide_links}{else}{/if} {elseif $show_trunc_name} {if $hide_links}{else}{/if}{$product.product|truncate:44:"...":true nofilter}{if $hide_links}{else}{/if} {/if} {/hook} {/capture} {if $no_capture} {assign var="capture_name" value="name_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="sku_`$obj_id`"} {if $show_sku}
{if $show_sku_label} {/if} {$product.product_code}
{/if} {/capture} {if $no_capture} {assign var="capture_name" value="sku_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="rating_`$obj_id`"} {hook name="products:data_block"} {/hook} {/capture} {if $no_capture} {assign var="capture_name" value="rating_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="add_to_cart_`$obj_id`"} {if $show_add_to_cart}
{strip} {capture name="buttons_product"} {hook name="products:add_to_cart"} {if $product.has_options && !$show_product_options && !$details_page} {if $but_role == "text"} {$opt_but_role="text"} {else} {$opt_but_role="action"} {/if} {include file="buttons/button.tpl" but_id="button_cart_`$obj_prefix``$obj_id`" but_text=__("select_options") but_href="products.view?product_id=`$product.product_id`" but_role=$opt_but_role but_name="" but_meta="ty-btn__primary ty-btn__big"} {else} {hook name="products:add_to_cart_but_id"} {$_but_id="button_cart_`$obj_prefix``$obj_id`"} {/hook} {if $extra_button}{$extra_button nofilter} {/if} {include file="buttons/add_to_cart.tpl" but_id=$_but_id but_name="dispatch[checkout.add..`$obj_id`]" but_role=$but_role block_width=$block_width obj_id=$obj_id product=$product but_meta=$add_to_cart_meta} {assign var="cart_button_exists" value=true} {/if} {/hook} {/capture} {hook name="products:buttons_block"} {if ( $product.zero_price_action != "R" || $product.price != 0 ) && ( $settings.General.inventory_tracking != "Y" || $settings.General.allow_negative_amount == "Y" || ( $product_amount > 0 && $product_amount >= $product.min_qty ) || $product.tracking == "ProductTracking::DO_NOT_TRACK"|enum || $product.is_edp == "Y" || $product.out_of_stock_actions == "OutOfStockActions::BUY_IN_ADVANCE"|enum ) || ( $product.has_options && !$show_product_options )} {if $smarty.capture.buttons_product|trim != ' '} {if $product.avail_since <= $smarty.const.TIME || ( $product.avail_since > $smarty.const.TIME && $product.out_of_stock_actions == "OutOfStockActions::BUY_IN_ADVANCE"|enum )} {$smarty.capture.buttons_product nofilter} {/if} {/if} {elseif ($settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y" && (($product_amount <= 0 || $product_amount < $product.min_qty) && $product.tracking != "ProductTracking::DO_NOT_TRACK"|enum) && $product.is_edp != "Y")} {hook name="products:out_of_stock_block"} {assign var="show_qty" value=false} {if !$details_page} {if (!$product.hide_stock_info && !(($product_amount <= 0 || $product_amount < $product.min_qty) && ($product.avail_since > $smarty.const.TIME)))} {$out_of_stock_text} {/if} {elseif (($product.out_of_stock_actions == "OutOfStockActions::SUBSCRIBE"|enum) && ($product.tracking != "ProductTracking::TRACK_WITH_OPTIONS"|enum))} {hook name="product_data:back_in_stock_checkbox"}
{/hook} {if !$auth.user_id }
{/if} {/if} {/hook} {/if} {if $show_list_buttons} {capture name="product_buy_now_`$obj_id`"} {$compare_product_id = $product.product_id} {hook name="products:buy_now"} {if $settings.General.enable_compare_products == "Y"} {include file="buttons/add_to_compare_list.tpl" product_id=$compare_product_id} {/if} {/hook} {/capture} {assign var="capture_buy_now" value="product_buy_now_`$obj_id`"} {if $smarty.capture.$capture_buy_now|trim} {$smarty.capture.$capture_buy_now nofilter} {/if} {/if} {if ($product.avail_since > $smarty.const.TIME)} {include file="common/coming_soon_notice.tpl" avail_date=$product.avail_since add_to_cart=$product.out_of_stock_actions} {/if} {* Uncomment these lines in the overrides hooks for back-passing $cart_button_exists variable to the product_data template *} {*if $cart_button_exists} {capture name="cart_button_exists"}Y{/capture} {/if*} {/hook} {/strip}
{/if} {/capture} {if $smarty.capture.cart_button_exists} {assign var="cart_button_exists" value=true} {/if} {if $no_capture} {assign var="capture_name" value="add_to_cart_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="product_features_`$obj_id`"} {hook name="products:product_features"} {if $show_features}
{include file="views/products/components/product_features_short_list.tpl" features=$product|fn_get_product_features_list no_container=true}
{/if} {/hook} {/capture} {if $no_capture} {assign var="capture_name" value="product_features_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="prod_descr_`$obj_id`"} {if $show_descr} {if $product.short_description}
{$product.short_description nofilter}
{else}
{$product.full_description|strip_tags|truncate:160 nofilter}
{/if} {/if} {/capture} {if $no_capture} {assign var="capture_name" value="prod_descr_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {********************** Old Price *****************} {capture name="old_price_`$obj_id`"} {if $show_price_values && $show_old_price} {hook name="products:old_price"} {if $product.discount} {if $details_page}{__("old_price")}: {/if}{include file="common/price.tpl" value=$product.original_price|default:$product.base_price span_id="old_price_`$obj_prefix``$obj_id`" class="ty-list-price ty-nowrap"} {elseif $product.list_discount} {if $details_page}{__("list_price")}: {/if}{include file="common/price.tpl" value=$product.list_price span_id="list_price_`$obj_prefix``$obj_id`" class="ty-list-price ty-nowrap"} {/if} {/hook} {/if} {/capture} {if $no_capture} {assign var="capture_name" value="old_price_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {********************** Price *********************} {capture name="price_`$obj_id`"} {if $show_price_values} {if $show_price} {hook name="products:prices_block"} {if $product.price|floatval || $product.zero_price_action == "P" || ($hide_add_to_cart_button == "Y" && $product.zero_price_action == "A")} {include file="common/price.tpl" value=$product.price span_id="discounted_price_`$obj_prefix``$obj_id`" class="ty-price-num" live_editor_name="product:price:{$product.product_id}" live_editor_phrase=$product.base_price} {elseif $product.zero_price_action == "A" && $show_add_to_cart} {assign var="base_currency" value=$currencies[$smarty.const.CART_PRIMARY_CURRENCY]} {__("enter_your_price")}:
{if $base_currency.after != "Y"}{$base_currency.symbol nofilter}{/if} {if $base_currency.after == "Y"}{$base_currency.symbol nofilter}{/if}
{elseif $product.zero_price_action == "R"} {__("contact_us_for_price")} {assign var="show_qty" value=false} {/if} {/hook} {/if} {elseif $settings.Checkout.allow_anonymous_shopping == "hide_price_and_add_to_cart" && !$auth.user_id} {__("sign_in_to_view_price")} {/if}
{/capture} {if $no_capture} {assign var="capture_name" value="price_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {******************* Clean Price ******************} {capture name="clean_price_`$obj_id`"} {if $show_price_values && $show_clean_price && $settings.Appearance.show_prices_taxed_clean == "Y" && $product.taxed_price} {if $product.clean_price != $product.taxed_price && $product.included_tax} ({include file="common/price.tpl" value=$product.taxed_price span_id="product_price_`$obj_prefix``$obj_id`" class="ty-list-price ty-nowrap"} {__("inc_tax")}) {elseif $product.clean_price != $product.taxed_price && !$product.included_tax} ({__("including_tax")}) {/if} {/if} {/capture} {if $no_capture} {assign var="capture_name" value="clean_price_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {********************** You Save ******************} {capture name="list_discount_`$obj_id`"} {if $show_price_values && $show_list_discount && $details_page} {if $product.discount} {__("you_save")}: {include file="common/price.tpl" value=$product.discount span_id="discount_value_`$obj_prefix``$obj_id`" class="ty-list-price ty-nowrap"} ({$product.discount_prc}%) {elseif $product.list_discount} {__("you_save")}: {include file="common/price.tpl" value=$product.list_discount span_id="discount_value_`$obj_prefix``$obj_id`"} ({$product.list_discount_prc}%) {/if} {/if} {/capture} {if $no_capture} {assign var="capture_name" value="list_discount_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {************************************ Discount label ****************************} {capture name="discount_label_`$obj_prefix``$obj_id`"} {if $show_discount_label && ($product.discount_prc || $product.list_discount_prc) && $show_price_values} {__("save_discount")} {if $product.discount}{$product.discount_prc}{else}{$product.list_discount_prc}{/if}% {/if} {/capture} {if $no_capture} {assign var="capture_name" value="discount_label_`$obj_prefix``$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {************************************ Product labels ****************************} {$product_labels_position = $product_labels_position|default:"top-right"} {capture name="product_labels_`$obj_prefix``$obj_id`"} {if $show_product_labels} {capture name="capture_product_labels_`$obj_prefix``$obj_id`"} {hook name="products:product_labels"} {if $show_shipping_label && $product.free_shipping == "Y"} {include file="views/products/components/product_label.tpl" label_meta="ty-product-labels__item--shipping" label_text=__("free_shipping") label_mini=$product_labels_mini label_static=$product_labels_static label_rounded=$product_labels_rounded } {/if} {if $show_discount_label && ($product.discount_prc || $product.list_discount_prc) && $show_price_values} {if $product.discount} {$label_text = "{__("save_discount")} {$product.discount_prc}%"} {else} {$label_text = "{__("save_discount")} {$product.list_discount_prc}%"} {/if} {include file="views/products/components/product_label.tpl" label_meta="ty-product-labels__item--discount" label_text=$label_text label_mini=$product_labels_mini label_static=$product_labels_static label_rounded=$product_labels_rounded } {/if} {/hook} {/capture} {$capture_product_labels = "capture_product_labels_`$obj_prefix``$obj_id`"} {if $smarty.capture.$capture_product_labels|trim}
{$smarty.capture.$capture_product_labels nofilter}
{/if} {/if} {/capture} {if $no_capture} {$capture_name = "product_labels_`$obj_prefix``$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="product_amount_`$obj_id`"} {hook name="products:product_amount"} {if $show_product_amount && $product.is_edp != "Y" && $settings.General.inventory_tracking == "Y"}
{if !$product.hide_stock_info} {if $settings.Appearance.in_stock_field == "Y"} {if $product.tracking != "ProductTracking::DO_NOT_TRACK"|enum} {if ($product_amount > 0 && $product_amount >= $product.min_qty) && $settings.General.inventory_tracking == "Y" || $details_page} {if ( $product_amount > 0 && $product_amount >= $product.min_qty || $product.out_of_stock_actions == "OutOfStockActions::BUY_IN_ADVANCE"|enum ) && $settings.General.inventory_tracking == "Y" }
{if $show_amount_label} {/if} {if $product_amount > 0} {$product_amount} {__("items")} {else} {__("on_backorder")} {/if}
{elseif $settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y"}
{if $show_amount_label} {/if} {$out_of_stock_text}
{/if} {/if} {/if} {else} {if ( $product_amount > 0 && $product_amount >= $product.min_qty || $product.tracking == "ProductTracking::DO_NOT_TRACK"|enum ) && $settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y" || $settings.General.inventory_tracking == "Y" && ( $settings.General.allow_negative_amount == "Y" || $product.out_of_stock_actions == "OutOfStockActions::BUY_IN_ADVANCE"|enum ) }
{if $show_amount_label} {/if} {if $product_amount > 0} {__("in_stock")} {else} {__("on_backorder")} {/if}
{elseif $details_page && ( $product_amount <= 0 || $product_amount < $product.min_qty ) && $settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y" }
{if $show_amount_label} {/if} {$out_of_stock_text}
{/if} {/if} {/if}
{/if} {/hook} {/capture} {if $no_capture} {assign var="capture_name" value="product_amount_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="product_options_`$obj_id`"} {if $show_product_options}
{hook name="products:product_option_content"} {if $disable_ids} {assign var="_disable_ids" value="`$disable_ids``$obj_id`"} {else} {assign var="_disable_ids" value=""} {/if} {include file="views/products/components/product_options.tpl" id=$obj_id product_options=$product.product_options name="product_data" capture_options_vs_qty=$capture_options_vs_qty disable_ids=$_disable_ids} {/hook}
{/if} {/capture} {if $no_capture} {assign var="capture_name" value="product_options_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="advanced_options_`$obj_id`"} {if $show_product_options}
{include file="views/companies/components/product_company_data.tpl" company_name=$product.company_name company_id=$product.company_id} {hook name="products:options_advanced"} {/hook}
{/if} {/capture} {if $no_capture} {assign var="capture_name" value="advanced_options_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="qty_`$obj_id`"} {hook name="products:qty"}
{if !empty($product.selected_amount)} {assign var="default_amount" value=$product.selected_amount} {elseif !empty($product.min_qty)} {assign var="default_amount" value=$product.min_qty} {elseif !empty($product.qty_step)} {assign var="default_amount" value=$product.qty_step} {else} {assign var="default_amount" value="1"} {/if} {if $show_qty && $product.is_edp !== "Y" && $cart_button_exists == true && ($settings.Checkout.allow_anonymous_shopping == "allow_shopping" || $auth.user_id) && $product.avail_since <= $smarty.const.TIME || ($product.avail_since > $smarty.const.TIME && $product.out_of_stock_actions == "OutOfStockActions::BUY_IN_ADVANCE"|enum)}
{if !$hide_qty_label}{/if} {if $product.qty_content} {else}
{if $settings.Appearance.quantity_changer == "Y"} + {/if} 1}readonly="readonly"{/if} type="text" size="5" class="ty-value-changer__input cm-amount" id="qty_count_{$obj_prefix}{$obj_id}" name="product_data[{$obj_id}][amount]" value="{$default_amount}"{if $product.qty_step > 1} data-ca-step="{$product.qty_step}"{/if} data-ca-min-qty="{if $product.min_qty > 1}{$product.min_qty}{else}1{/if}" /> {if $settings.Appearance.quantity_changer == "Y"} {/if}
{/if}
{if $product.prices} {include file="views/products/components/products_qty_discounts.tpl"} {/if} {elseif !$bulk_add} {/if}
{/hook} {/capture} {if $no_capture} {assign var="capture_name" value="qty_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="min_qty_`$obj_id`"} {hook name="products:qty_description"} {if $min_qty && $product.min_qty}

{__("text_cart_min_qty", ["[product]" => $product.product, "[quantity]" => $product.min_qty])}.

{/if} {/hook} {/capture} {if $no_capture} {assign var="capture_name" value="min_qty_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="product_edp_`$obj_id`"} {if $show_edp && $product.is_edp == "Y"}

{__("text_edp_product")}.

{/if} {/capture} {if $no_capture} {assign var="capture_name" value="product_edp_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {capture name="form_close_`$obj_id`"} {if !$hide_form}
{/if} {/capture} {if $no_capture} {assign var="capture_name" value="form_close_`$obj_id`"} {$smarty.capture.$capture_name nofilter} {/if} {foreach from=$images key="object_id" item="image"} {assign var="product_link" value=$image.link} {hook name="products:list_images_block"}
{if $product_link} {/if} {include file="common/image.tpl" image_width=$image.width image_height=$image.height obj_id=$object_id images=$product.main_pair} {if $image.link} {/if}
{/hook} {/foreach} {/hook} {hook name="products:product_data"}{/hook}