<?xml version='1.0' encoding='UTF-8'?><uidget><metadata><name>Store</name><description>Create an online store</description><help><![CDATA[
			With the Store Block, you can create your own e-commerce website.&lt;br&gt; You can create as many categories as you need (shoes, t-shirts, bikes, ...) to sort your products. If your website uses the E-commerce or Pro package, you can add online payment methods. If your website uses the Pro package, you can setup discounts, delivery methods, abandoned cart email, etc... 
]]></help><api_version>1.0</api_version><server>local://StoreCptServer</server><size height='400' width='800' /><blog en='144' /><max bg='0' url='1' /><gdpr enabled='true' hide_property='true' /></metadata><view><content>&lt;div class=&quot;uis_warn&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;uis_add_to_cart&quot; style=&quot;display:none&quot;&gt;
  &lt;div class=&quot;uis_add_cart_w&quot;&gt;
    &lt;h2 class=uis_add_to_cart_infos&gt;A new item has been added to your cart.&lt;/h2&gt;
    &lt;div class=&quot;uis_btn uis_view_cart site_button&quot;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;View Cart&lt;/span&gt;&lt;/div&gt;
    &lt;div class=&quot;uis_btn uis_checkout site_button&quot;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;Proceed to checkout &lt;span class=uis_nbr_items&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
    &lt;div class=&quot;uis_btn uis_shopping site_button&quot;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;Continue shopping&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;uis_bill&quot;&gt;
	&lt;div class=&apos;uis_bill_breadcrumb&apos; style=&apos;display:none&apos;&gt;
		&lt;div data-page=c&gt;Cart&lt;/div&gt;
		&lt;div data-page=f&gt;Address&lt;/div&gt;
		&lt;div data-page=shipping&gt;Delivery&lt;/div&gt;
		&lt;div data-page=summary&gt;Validation&lt;/div&gt;
		&lt;div data-page=cb&gt;Payment&lt;/div&gt;
	&lt;/div&gt;
  &lt;div class=&apos;uis_bill_page uis_bill_c&apos;&gt;&lt;/div&gt;
  &lt;div class=&apos;uis_bill_page uis_bill_f&apos; style=&apos;display:none&apos;&gt;
    &lt;div class=&quot;uis_btn uis_sc site_button&quot;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;&amp;lt;&amp;lt; Back to Cart&lt;/span&gt;&lt;/div&gt;
    &lt;div class=uis_bill_mn&gt;&lt;h2 class=&quot;font_title_2&quot;&gt;Your details&lt;/h2&gt;&lt;div class=&apos;uis_bfb&apos;&gt;&lt;/div&gt;&lt;/div&gt;
    &lt;table&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;td colspan=2&gt;&lt;span class=&quot;_ui18_do_member_signup site_button&quot;&gt;Please fill in your coordinates below&lt;/span&gt;&lt;span class=member_unconnected&gt; or &lt;span class=&apos;_ui18_do_member_signin site_button&apos;&gt;Sign-in&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td colspan=2 class=&apos;uis_cerr&apos;&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody class=&apos;uis_bft&apos;&gt;&lt;/tbody&gt;
      &lt;tfoot&gt;
        &lt;tr&gt;
          &lt;td colspan=2&gt;
            &lt;div class=&quot;component_gdpr_container uis_gdpr&quot;&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td colspan=2&gt;* Fields are required&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tfoot&gt;
    &lt;/table&gt;
    &lt;div class=&quot;uis_btn uis_sbpm site_button&quot; style=&apos;float:right&apos;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;Next step &amp;gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&apos;uis_bill_page uis_bill_shipping&apos; style=&apos;display:none&apos;&gt;
    &lt;div class=&quot;uis_btn uis_sc site_button&quot;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;&amp;lt;&amp;lt; Back to Cart&lt;/span&gt;&lt;/div&gt;
    &lt;div class=uis_bill_shipping_form&gt;&lt;/div&gt;
    &lt;div class=&quot;uis_btn uis_save_shipping site_button&quot; style=&apos;float:right&apos;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;Next step &amp;gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&apos;uis_bill_page uis_bill_summary&apos; style=&apos;display:none&apos;&gt;
    &lt;div class=&quot;uis_btn uis_sc site_button&quot;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;&amp;lt;&amp;lt; Correct order&lt;/span&gt;&lt;/div&gt;
    &lt;div class=uis_summary_content&gt;&lt;/div&gt;
    &lt;div class=&quot;uis_btn uis_pay site_button&quot; style=&apos;float:right&apos;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;Pay to order&lt;/span&gt; &amp;gt;&amp;gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&apos;uis_bill_page uis_bill_cb&apos; style=&apos;display:none&apos;&gt;
    &lt;div class=&quot;uis_btn uis_sc site_button&quot;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;&amp;lt;&amp;lt; Back to Cart&lt;/span&gt;&lt;/div&gt;
    &lt;div class=uis_bill_mn&gt;&lt;h2 class=&quot;font_title_2&quot;&gt;Credit card selection&lt;/h2&gt;&lt;/div&gt;
    &lt;div class=uis_cb_form&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&apos;uis_bill_page uis_bill_m&apos; style=&apos;display:none&apos;&gt;
    &lt;div class=uis_bill_mn&gt;&lt;h2 class=&quot;font_title_2&quot;&gt;Congratulations&lt;/h2&gt;&lt;div class=&apos;uis_bfa&apos;&gt;&lt;/div&gt;&lt;/div&gt;
    &lt;div style=&quot;width: 100%; text-align: center; clear: both;&quot;&gt;
      &lt;span class=&quot;uis_btn uis_back_to_store site_button&quot; style=&quot;display:inline-block;float:none&quot;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;Back to Store&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;uis_btn uis_order_follow site_button&quot; style=&quot;display:inline-block;float:none&quot;&gt;&lt;span class=&quot;uis_bsa&quot;&gt;Order follow&lt;/span&gt;&lt;/span&gt;&lt;br&gt;
      &lt;a href=&quot;#&quot; class=&quot;uis_sc uis_other_payment_method&quot;&gt;Choose another payment method&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;uis_catalog&quot;&gt;
  &lt;div class=&quot;uis_search&quot;&gt;&lt;/div&gt;
  &lt;div class=&quot;uis_cart&quot;&gt;&lt;/div&gt;
  &lt;div class=&quot;uis_cat&quot;&gt;&lt;/div&gt;
  &lt;div class=&quot;uis_list&quot;&gt;
    &lt;div class=&quot;uis_sort&quot;&gt;Sort by: &lt;span class=&quot;uis_sn uis_ss&quot; data-sort=&quot;n&quot;&gt;Name&lt;/span&gt; - &lt;span class=&quot;uis_sp&quot; data-sort=&quot;p&quot;&gt;Price&lt;/span&gt;&lt;/div&gt;
    &lt;div class=&quot;uis_pages&quot;&gt;&lt;/div&gt;
    &lt;ul&gt;&lt;/ul&gt;
    &lt;div class=&quot;uis_pages&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;uis_prod&quot;&gt;
    &lt;table width=&quot;100%&quot;&gt;&lt;tr&gt;
      &lt;td class=&quot;uis_td_imgs&quot;&gt;&lt;div&gt;
        &lt;div class=&quot;uis_img&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;uis_imgs&quot;&gt;
          &lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;&lt;/td&gt;
      &lt;td class=&quot;uis_td_attr&quot;&gt;
        &lt;div class=&quot;block_section&quot;&gt;
          &lt;input type=&quot;hidden&quot; class=&quot;uis_prodid&quot;&gt;
          &lt;div class=&quot;admin_elem admin_title&quot;&gt;General information&lt;/div&gt;
          &lt;div class=&quot;uis_name&quot;&gt;&amp;nbsp;&lt;/div&gt;
          &lt;div class=&quot;uis_prod_cat&quot;&gt;
            &lt;div class=&apos;uis_prod_label admin_elem uis_prod_cat_label&apos;&gt;Categories:&lt;/div&gt;
            &lt;ul class=&apos;uis_cat_list&apos;&gt;&lt;/ul&gt;
          &lt;/div&gt;
          &lt;div class=&quot;uis_prod_label admin_elem&quot;&gt;Price:&lt;/div&gt;
          &lt;div class=&quot;uis_prod_bloc&quot;&gt;
            &lt;div class=&quot;uis_prod_bloc_toggle admin_elem fonticon uis_more_prices_toggle helpEditor&quot; help=&quot;More price options&quot;&gt;V&lt;/div&gt;
            &lt;div class=&quot;uis_prices&quot;&gt;
              &lt;span class=&quot;uis_price&quot;&gt;&lt;/span&gt;
              &lt;span class=&quot;uis_strike not_admin_elem&quot;&gt;&lt;/span&gt;
              &lt;div class=&quot;toggle_strike_price editor_interface admin_elem ib&quot; style=&quot;margin: 0 10px;&quot;&gt;
                &lt;b style=&quot;display: inline-block;vertical-align: super;&quot;&gt;strike-through price&lt;/b&gt;
              &lt;/div&gt;
              &lt;span class=&quot;uis_strike_input&quot;&gt;&lt;/span&gt;
              &lt;div class=&quot;admin_elem editor_interface&quot;&gt;
                &lt;div class=&quot;uis_more_prices&quot; style=&quot;display:none;&quot;&gt;
                  &lt;span class=uis_custom_prices_header&gt;Volume prices and Customer specific prices:&lt;/span&gt;
                  &lt;table class=&quot;admin_elem tablesorter uis_custom_prices_table&quot;&gt;
                    &lt;thead&gt;
                      &lt;tr&gt;
                        &lt;th&gt;Quantity&lt;/th&gt;
                        &lt;th&gt;Member group&lt;/th&gt;
                        &lt;th&gt;Discount&lt;/th&gt;
                        &lt;th&gt;Amount&lt;/th&gt;
                        &lt;th&gt;Delete&lt;/th&gt;
                      &lt;/tr&gt;
                    &lt;/thead&gt;
                    &lt;tbody class=&quot;uis_custom_prices_tbody&quot;&gt;
                    &lt;/tbody&gt;
                  &lt;/table&gt;
                  &lt;div style=&apos;text-align:center;&apos;&gt;
                    &lt;span class=&apos;ib edit_btn uis_add_custom_price&apos;&gt;Add a custom price&lt;/span&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;

            &lt;/div&gt;
          &lt;/div&gt;
            &lt;div class=&quot;uis_prod_label admin_elem&quot;&gt;Stock:&lt;/div&gt;
          &lt;div class=&quot;uis_prod_bloc uis_prod_bloc_stock&quot;&gt;
            &lt;div class=&quot;uis_prod_bloc_toggle admin_elem fonticon uis_stock_sentence_show_more helpEditor&quot; help=&quot;More stock options&quot;&gt;V&lt;/div&gt;
            &lt;div class=&quot;admin_elem editor_interface&quot;&gt;
              &lt;div class=&quot;uis_more_stock_sentence_div&quot; style=&quot;display:none;&quot;&gt;
                &lt;div class=&apos;uis_stock_infos&apos;&gt;Stock information:&lt;/div&gt;

                &lt;div class=&quot;uis_stock_set_mode uis_custom_stock_default_sentence editor_interface&quot; &gt;
                  &lt;div&gt;
                    &lt;div class=&quot;uis_container uis_custom_stock_default_sentence&quot;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&quot;uis_stock_set_mode uis_custom_stock_sentence editor_interface&quot; &gt;
                  &lt;div&gt;
                    &lt;div class=&quot;uis_container uis_custom_stock_sentence&quot;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&quot;uis_stock_set_mode uis_big_container uis_replenishment_date&quot; &gt;
                  &lt;div&gt;
                    &lt;div class=&quot;uis_container uis_replenishment_date&quot;&gt;
                      &lt;div class=&quot;form-group&quot;&gt;
                        &lt;div class=&apos;input-group date uis_replenishment_date_input&apos;&gt;
                          &lt;input type=&apos;text&apos; class=&quot;uis_form-control_replenishment_date site_textbox&quot; /&gt;
                          &lt;span class=&quot;input-group-addon&quot; style=&quot;visibility:hidden;&quot;&gt;
                            &lt;span class=&quot;glyphicon glyphicon-time&quot;&gt;&lt;/span&gt;
                          &lt;/span&gt;

                        &lt;/div&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class=&quot;uis_stock_set_mode uis_big_container uis_pre_order_date&quot; &gt;
                  &lt;div&gt;
                    &lt;div class=&quot;uis_container uis_pre_order_date&quot; &gt;
                      &lt;div class=&quot;form-group&quot;&gt;
                        &lt;div class=&apos;input-group date uis_pre_order_date_input&apos;&gt;
                          &lt;input type=&apos;text&apos; class=&quot;uis_form-control_pre_order_date site_textbox&quot; /&gt;
                          &lt;span class=&quot;input-group-addon&quot; style=&quot;visibility:hidden;&quot;&gt;
                            &lt;span class=&quot;glyphicon glyphicon-time&quot;&gt;&lt;/span&gt;
                          &lt;/span&gt;
                        &lt;/div&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;uis_final_stock_sentence not_admin_elem&quot;&gt;&lt;/div&gt;
          &lt;div class=&quot;uis_price_opts&quot;&gt;&lt;/div&gt;
          &lt;div class=&quot;uis_custom_prices&quot;&gt;&lt;/div&gt;
          &lt;div class=&quot;uis_shipping_infos_product&quot;&gt;&lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;uis_opt block_section&quot;&gt;
          &lt;div class=&quot;admin_elem admin_title&quot;&gt;Product options &lt;small&gt;(Optional)&lt;/small&gt;&lt;/div&gt;
          &lt;div&gt;&lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;block_section editor_interface uis_hidden_data&quot;&gt;
          &lt;div class=&quot;admin_elem admin_title&quot;&gt;Private information &lt;small&gt;(Optional)&lt;/small&gt;&lt;/div&gt;
          &lt;div class=uis_ref&gt;&lt;b&gt;Reference:&lt;/b&gt; &lt;input class=&quot;site_textbox&quot; type=text maxlength=30&gt;
            &lt;span class=&quot;fonticon helpEditor iconHelp&quot; help=&quot;Reference for the product which will only be shown in the order form and the backoffice so that you can easily prepare orders.&quot;&gt;?&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class=uis_private_notes&gt;&lt;b&gt;Private notes:&lt;/b&gt; &lt;textarea class=&quot;site_textbox&quot;&gt;&lt;/textarea&gt;
            &lt;span class=&quot;fonticon helpEditor iconHelp&quot; help=&quot;Private notes are only shown on the product edit page.&quot;&gt;?&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class=uis_order&gt;
            &lt;span class=&quot;fonticon helpEditor iconHelp&quot; help=&quot;You can change order of products by setting here a number. Products will be sorted with highest number first and by name.&quot;&gt;?&lt;/span&gt;
            &lt;b&gt;Sort by name priority:&lt;/b&gt; &lt;input class=&quot;site_textbox&quot; type=number min=0 step=1 max=10000 style=&quot;width: 4em;&quot;&gt;
          &lt;/div&gt;
          &lt;div class=uis_weight&gt;&lt;b&gt;Weight:&lt;/b&gt; &lt;input class=&quot;site_textbox&quot; type=text size=4&gt; grams
            &lt;span class=&quot;fonticon helpEditor iconHelp&quot; help=&quot;Specify here the weight of the product including the weight of the delivery package for an accurate calculation of shipping fee based on weight.&quot;&gt;?&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class=uis_vat_rate&gt;&lt;b&gt;Special vat rate:&lt;/b&gt; &lt;input class=&quot;site_textbox&quot; type=number min=0 step=0.1 max=100 style=&quot;width: 5em;&quot;&gt; %&lt;/div&gt;
        &lt;/div&gt;
      &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
        &lt;div class=&quot;block_section uis_desc_wrapper&quot;&gt;
          &lt;b class=&quot;admin_elem admin_title&quot;&gt;Description:&lt;/b&gt;
          &lt;div class=&quot;uis_td_desc&quot;&gt;
            &lt;div class=&quot;uit_tbl uit_tbl_m&quot;&gt;
              &lt;div class=&quot;uit_ct&quot;&gt;
                &lt;div class=&quot;tl&quot;&gt;&lt;/div&gt;
                &lt;div class=&quot;tr&quot;&gt;&lt;/div&gt;
                &lt;div class=&quot;br&quot;&gt;&lt;/div&gt;
                &lt;div class=&quot;bl&quot;&gt;&lt;/div&gt;
                &lt;div class=&quot;c&quot;&gt;
                  &lt;div class=&quot;uis_desc uit_cttxt uit_cttxt_m&quot; uitype=&quot;editor&quot; placeholder=&quot;Enter the product description here&quot; uiname=&quot;description&quot; uinocb=&quot;true&quot;&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;block_section uis_seo_description&quot;&gt;
          &lt;b class=&quot;admin_elem admin_title&quot;&gt;Search engine description &lt;small&gt;(Optional, 160 characters)&lt;/small&gt;&lt;/b&gt;
          &lt;textarea maxlength=160&gt;&lt;/textarea&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
</content><properties><hidden default='true' name='show_cat_all' /><checkbox default='true' help='By activating this feature, your visitors will be able to &lt;b&gt;search your store&lt;/b&gt; for products or categories.' name='search_field' value='Search field' /><server_manage feature='uis_payment_methods' help='Configure the payment methods. Required to be able to receive orders.' icon='cb' name='payment_conf' text='Payment methods' url='/store_provider/all' /><server_manage feature='uis_shipping' help='Configure the shipping costs.' icon='send' name='shipping_conf' text='Shipping costs' url='/store_shipping/shipping/' /><server_manage help='Add, delete, rename and order categories. Choose which categories are shown in this block.' icon='folder' name='manage' text='Manage Categories' url='/cpt_store/cat_manage' /><server_manage feature='uis_cart_options' help='&lt;b&gt;Cart options allow to display a form at the cart step to ask additional information and offer extra customized services.&lt;/b&gt;&lt;br&gt;For example, you can add a drop-down menu to allow your customers to ask if the order should be gift-wrapped (&lt;i&gt;Without gift-wrap&lt;/i&gt;, &lt;i&gt;Paper wrap&lt;/i&gt; or &lt;i&gt;Box wrap&lt;/i&gt; with additional cost). You can also add a free input to let them specify a name, color, location, animal... or any other customized value which could be applied to their order.&lt;br&gt;Note that these options are for the whole cart and that, on top of that, each product can be configured individually to have their own specific options on the product page.' name='cart_options' text='Cart options' url='/store_options/options/' /><server_manage feature='uis_coupons' help='Create and manage your store coupons' icon='order' name='coupons_conf' text='Coupons' url='/store_coupon/list/' /><server_manage feature='uis_billing' help='This feature allow the generation of valid bills for each received order.' icon='clipboard' name='billing_conf' text='Billing' url='/store_provider/billing/' /><server_manage feature='uis_stock' help='This feature manages your product stocks (and their options), when an order is placed on your online shop' icon='stock' name='stocks_conf' text='Stocks' url='/cpt_store/stock_manage/' /><server_manage feature='uis_terms' help='Configure the store Terms and store GDPR' icon='cgu' name='manage' text='Manage Terms and GDPR' url='/cpt_store/terms_manage' /><server_manage feature='uis_cb_text' help='Customize the text that precedes the credit cart payment form.' icon='cgu' name='cb_text' text='Custom CB step' url='/cpt_store/cb_text' /></properties><design_properties><select class='uis_prop_style' default='&apos;m&apos;' display='Material design|Small, with borders|Large, no borders|Horizontal list' help='Set the style of the product list.' name='style' values='m|s|l|h' /><number default='3' help='Set how many rows of products are shown per page.' maximum='25' minimum='1' name='rows' title='Rows' /><checkbox default='true' help='If checked, the height of the block will automatically be adapted to its content, possibly hiding blocks below it. In the other case a scrollbar will appear.' name='auto_size' value='Auto-Size' /><checkbox default='false' help='By activating this feature, &lt;b&gt;your visitors will not be able to download these images&lt;/b&gt; by right clicking on an image or by drag-dropping it or by browsing the source of the page.' name='protect' value='Anti-download' /><checkbox default='true' help='If checked, when the content of the page is loaded or the store page changes (product, shopping cart, category page...), the page will be automatically scrolled to the store block top.' name='auto_scroll' value='Auto-scroll' /><checkbox class='uis_prop_sitew' default='true' feature='uis_stock' help='Enables stock status display: Available, Out of stock, Only X item(s) left.' name='show_stocks' value='Show stock status' /><checkbox default='false' help='If checked, will display &apos;price from&apos; before prices of products with price options on products list' name='show_price_from' value='Display &apos;price from&apos; for products with price options' /><number class='uis_prop_sitew_sub' default='10' help='Allows to set the minimum product quantity to display an alert message such as &apos;Only X item(s) left&apos;' maximum='25' minimum='1' name='stock_limit' title='Set minimum stock level' /></design_properties></view><script>UI_List.UI_Store={initialize:function(a){this.cpt=a;
this.cpt.node.data(&quot;cpt_ui&quot;,this);
UI_Store.addCpt(a);
this.url=null;
this.pageSelected=0;
this.prodSelected=null;
this.catSelected=null;
this.cat_ids=[];
a.setOptions([&quot;locked&quot;]);
this.show_stocks_available=(v.mode==&quot;editor&quot;||v.features.uis_stock)
},onDisplay:function(h){var p=this;
this.next_show=$.Deferred();
$(&quot;div.uis_search&quot;,h).generateComponentSearchbar({type:&quot;store&quot;,placeholder:&quot;Search a product, category, ...&quot;,types:{category:&quot;Categories&quot;,word:&quot;Keywords&quot;,product:&quot;Products&quot;}});
var c=this.n={main:h,warn:h.find(&quot;.uis_warn&quot;),catal:h.find(&quot;.uis_catalog&quot;),bill:h.find(&quot;.uis_bill&quot;),billc:h.find(&quot;.uis_bill_c&quot;),cart:{main:h.find(&quot;.uis_cart&quot;)},cat:h.find(&quot;.uis_cat&quot;),sort:h.find(&quot;.uis_sort&quot;),pages:h.find(&quot;.uis_pages&quot;),list:h.find(&quot;.uis_list&quot;),ul:h.find(&quot;.uis_list ul&quot;),search:h.find(&quot;.uis_search&quot;),search_header:h.find(&quot;.uis_search_header&quot;),search_counter:h.find(&quot;.uis_nbr_search_results&quot;),suggestions_list:h.find(&quot;.ui_search_suggest&quot;),gdpr:h.find(&quot;.component_gdpr_container&quot;)};
c.main.data(&quot;cpt&quot;,this.cpt);
var l=h.find(&quot;.uis_prod&quot;);
c.prod={main:l,id:l.find(&quot;.uis_prodid&quot;),name:l.find(&quot;.uis_name&quot;),desc:l.find(&quot;.uis_desc&quot;),prices:l.find(&quot;.uis_prices&quot;),shipping_infos:l.find(&quot;.uis_shipping_infos_product&quot;),price:l.find(&quot;.uis_price&quot;),hidden:l.find(&quot;.uis_hidden_data&quot;),strike:l.find(&quot;.uis_strike&quot;),opt_price:l.find(&quot;.uis_price_opts&quot;),custom_prices:l.find(&quot;.uis_custom_prices&quot;),opt:l.find(&quot;.uis_opt&quot;),img:l.find(&quot;.uis_img&quot;),imgs:l.find(&quot;.uis_imgs &gt; div&quot;),cat:l.find(&quot;.uis_prod_cat&quot;),clist:l.find(&quot;.uis_prod_cat ul&quot;)};
this.size_getter_el=$(&quot;&lt;div&gt;&lt;/div&gt;&quot;).appendTo(h).css(&quot;clear&quot;,&quot;both&quot;)[0];
this.member_controller=new MemberController(h,this.cpt);
if(this.cpt.idserver){c.warn.html(&quot;&lt;img src=&apos;/assets/types/UI_Store/64.png&apos;&gt;&lt;br&gt;&lt;img src=&apos;/assets/loadingAnimation.gif&apos;&gt;&quot;)
}else{var k=function(){if(confirm(sprintf(&quot;Do you want to save this page (as a draft) to start the block configuration?&quot;))){p.cpt.page.saveAndCleanHistory().then(function(){sigCtl.emit(&quot;UI_Store.saved&quot;)
})
}};
c.warn.html(&quot;Save the page (as a draft) and start the block configuration.&quot;).css(&quot;cursor&quot;,&quot;pointer&quot;).click(k);
setTimeout(k,0)
}this.n.sort.find(&quot;span&quot;).click(function(){var f=p._getProdListSort();
var d=$(this).data(&quot;sort&quot;);
p._setProdListSort(d,d==f[0]?!f[1]:true);
p.updateProdListGui()
});
$.extend(this,componentGdpr);
this.initGdpr();
if(v.mode==&quot;editor&quot;){this.n.main.addClass(&quot;uic_editable&quot;);
c.prod.name.html(&apos;&lt;input type=text class=&quot;uis_prod_name live_edit&quot; maxlength=&quot;200&quot; placeholder=&quot;Product name&quot;&gt;&apos;).find(&quot;input&quot;).click(function(){var d=$(this);
if(d.val()==&quot;Product name&quot;){d.val(&quot;&quot;)
}});
c.prod.price_strike_node=$(&apos;&lt;div class=&quot;prop_switch&quot; style=&quot;display: inline-block&quot;&gt;&lt;input id=&quot;toggle_strike_price_&apos;+this.cpt.getId()+&apos;&quot; type=&quot;checkbox&quot;&gt;&lt;label for=&quot;toggle_strike_price_&apos;+this.cpt.getId()+&apos;&quot;&gt;&lt;/label&gt;&lt;/div&gt;&apos;).prependTo($(&quot;.toggle_strike_price&quot;,this.n.prod.main));
c.prod.price_strike_node.find(&quot;input[type=checkbox]&quot;).on(&quot;click&quot;,function(){p._toggle_strike_price($(this).is(&quot;:checked&quot;))
});
c.prod.visi=$(&quot;&lt;div class=&apos;uis_visi editor_interface admin_elem&apos;&gt;&lt;b&gt;Visible&lt;/b&gt;&lt;div class=&apos;prop_switch&apos;&gt;&lt;input id=&apos;uis_visi_&quot;+this.cpt.getId()+&quot;&apos; type=&apos;checkbox&apos;&gt;&lt;label for=&apos;uis_visi_&quot;+this.cpt.getId()+&quot;&apos;&gt;&lt;/label&gt;&lt;/div&gt;&lt;/div&gt;&quot;).insertAfter(c.prod.hidden);
c.prod.digital=$(&quot;&lt;div class=uis_digital&gt;&lt;b&gt;Digital product:&lt;/b&gt; &lt;div class=&apos;prop_switch&apos; style=&apos;display:inline&apos;&gt;&lt;input id=&apos;uis_digital_&quot;+this.cpt.getId()+&quot;&apos; type=&apos;checkbox&apos;&gt;&lt;label for=&apos;uis_digital_&quot;+this.cpt.getId()+&quot;&apos;&gt;&lt;/label&gt;&lt;/div&gt;&lt;span class=&apos;uis_set_attachments admin_elem ib edit_btn&apos;&gt;Set digital content&lt;/span&gt;&lt;/div&gt;&quot;).insertBefore($(&quot;.uis_vat_rate&quot;,c.prod.hidden));
c.prod.digital.append(HelpTagEditor(&quot;Add files or protected pages with limited access. The links will be sent upon order payment.&quot;));
var q=$(&quot;&lt;div class=&apos;uis_stock admin_elem&apos;&gt;&lt;input type=&apos;text&apos; class=&apos;uis_set_stock live_edit site_textbox&apos; /&gt; items in stock&lt;/label&gt;&lt;/div&gt;&quot;).prependTo(c.prod.main.find(&quot;.uis_prod_bloc_stock&quot;));
q.append(HelpTagEditor(&quot;Maximum number of items a customer can buy (between 0 and 99999).&lt;ul&gt;&lt;li&gt;&lt;b&gt;If you enter 0&lt;/b&gt;, customers will see this product, but will not be able to add it to the shopping cart.&lt;/li&gt;&lt;li&gt;&lt;b&gt;If you enter 1&lt;/b&gt;, they will be able to buy only one product.&lt;/li&gt;&lt;li&gt;&lt;b&gt;If more than 1&lt;/b&gt;, they will be able to choose how many items they want to order.&lt;/li&gt;&lt;/ul&gt;&quot;));
q.append(&apos;&lt;div class=&quot;uis_stock_preview&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&apos;);
var g=$(&quot;.uis_stock_preview &gt; div&quot;,p.cpt.node);
c.prod.max=q.find(&quot;input.uis_set_stock&quot;,this.cpt.node).restrictTo(&quot;int&quot;,0,99999,null,function(){var f=parseInt(this.val());
var d=p.custom_stock_sentence(p.prodSelected,{stock_mode:&quot;default_sentence&quot;,p_max:f});
if($(&quot;[name=stock_mode]:checked&quot;,p.n.main).val()==&quot;default_sentence&quot;){g.removeClass(&quot;hight low uisa_s&quot;);
g.html(d[0]).addClass(d[1])
}});
$(&quot;.uis_stock_infos&quot;,p.cpt.node).append(HelpTagEditor(&quot;You can customize the availability of the product here. It can be &lt;ul&gt;&lt;li&gt;&lt;b&gt;In stock&lt;/b&gt;, &lt;b&gt;Only X products left&lt;/b&gt;, &lt;b&gt;Sold out&lt;/b&gt;: an automatic sentence which depends of the stock number&lt;/li&gt;&lt;li&gt;&lt;b&gt;Will be back soon&lt;/b&gt;, &lt;b&gt;Available on october 10th&lt;/b&gt;, &lt;b&gt;Discontinued&lt;/b&gt;: a fixed custom sentence&lt;/li&gt;&lt;li&gt;&lt;b&gt;Available in X days&lt;/b&gt;: a sentence based on a replenishment date&lt;/li&gt;&lt;li&gt;&lt;b&gt;Available on XX/XX/XXXX&lt;/b&gt;: a pre-order availability date&lt;/li&gt;&lt;/ul&gt; For the automatic mode, the color of the text is automatic (green when in stock, orange when the stock is limited, and red when out of stock). For the other modes, you can choose the sentence color. If you set the stock number to 0, the price and add to cart button will not be shown, preventing visitors from ordering. Just set a number above 0 to enable price display and add to cart button.&lt;br&gt;&lt;br&gt;On top of those options, you can set the visibility of the stock sentence and limited stock threshold on each store block, in the design panel, and you can set a site-wide custom sold-out text displayed when the stock is 0 in automatic mode, in the &lt;i&gt;Stocks&lt;/i&gt; option of the content panel.&quot;));
$(&quot;.uis_custom_stock_sentence &gt; div&quot;,p.cpt.node).append(HelpTagEditor(&quot;You can set your own custom stock sentence here.&lt;br&gt;For exemple, if you have a constant &lt;b&gt;order time&lt;/b&gt;, you can show something like &apos;Available in 1 week&apos;.&lt;br&gt;If you set the stock number to 0, the price and add to cart button will not be shown.&lt;br&gt;You can also choose your sentence color by clicking on the colored squares below.&quot;));
$(&quot;&lt;div class=&apos;uis_custom_stock_default_sentence_2 editor_interface&apos;&gt;&lt;input class=&apos;rad_blue rad uis_custom_stock_default_sentence_radiobutton&apos; id=&apos;uis_custom_stock_default_sentence_&quot;+this.cpt.getId()+&quot;&apos; type=&apos;radio&apos; name=&apos;stock_mode&apos; value=&apos;default_sentence&apos;&gt;&lt;label for=&apos;uis_custom_stock_default_sentence_&quot;+this.cpt.getId()+&quot;&apos;&gt;Use automatic stock&lt;/label&gt; &lt;/div&gt;&quot;).insertBefore($(&quot;.uis_container.uis_custom_stock_default_sentence&quot;,p.cpt.node));
$(&quot;&lt;div class=&apos;uis_custom_stock_sentence_2 editor_interface&apos;&gt;&lt;input class=&apos;rad_blue rad uis_custom_stock_sentence_radiobutton hight&apos; id=&apos;uis_custom_stock_sentence_&quot;+this.cpt.getId()+&quot;&apos; type=&apos;radio&apos; name=&apos;stock_mode&apos; value=&apos;custom_sentence&apos;&gt;&lt;label for=&apos;uis_custom_stock_sentence_&quot;+this.cpt.getId()+&quot;&apos;&gt;Custom sentence &lt;input type=&apos;text&apos; class=&apos;uis_custom_stock_sentence_input site_textbox&apos; id=&apos;uis_custom_stock_sentence_text_&quot;+this.cpt.getId()+&quot;&apos;&gt;&lt;/label&gt; &lt;/div&gt;&quot;).insertBefore($(&quot;.uis_container.uis_custom_stock_sentence&quot;,p.cpt.node));
HelpTagEditor(&quot;Choose this option to set a replenishment date. Visitors will see the availability delay.&lt;br&gt;On this date, the product will automatically switch to automatic stock mode with the configured stock number. If you set the stock number to 0, the price and add to cart button will not be shown.&lt;br&gt;You can also choose your sentence color by clicking on the colored squares below.&quot;).appendTo($(&quot;.uis_replenishment_date &gt; div:first&quot;,this.cpt.node));
var a=$(&quot;&lt;div class=&apos;uis_replenishment_date editor_interface&apos;&gt;&lt;input class=&apos;rad_blue rad uis_replenishment_date_radiobutton&apos; id=&apos;uis_replenishment_date_radiobutton_&quot;+this.cpt.getId()+&quot;&apos; type=&apos;radio&apos; name=&apos;stock_mode&apos; value=&apos;replenishment&apos;&gt;&lt;label for=&apos;uis_replenishment_date_radiobutton_&quot;+this.cpt.getId()+&quot;&apos; &gt;Replenishment date &lt;/label&gt; &lt;/div&gt;&quot;).insertBefore($(&quot;.uis_container.uis_replenishment_date&quot;,p.cpt.node));
HelpTagEditor(&quot;Choose this option to set a replenishment date. Visitors will see the availability delay.&lt;br&gt;On this date, the product will automatically switch to automatic stock mode with the configured stock number. If you set the stock number to 0, the price and add to cart button will not be shown.&lt;br&gt;You can also choose your sentence color by clicking on the colored squares below.&quot;).appendTo($(&quot;.uis_replenishment_date &gt; div:first&quot;,this.cpt.node));
var i=$(&quot;&lt;div class=&apos;uis_pre_order_date editor_interface&apos;&gt;&lt;input class=&apos;rad_blue rad uis_pre_order_date_radiobutton&apos; id=&apos;uis_pre_order_date_radiobutton_&quot;+this.cpt.getId()+&quot;&apos;type=&apos;radio&apos; name=&apos;stock_mode&apos; value=&apos;pre_order&apos;&gt;&lt;label for=&apos;uis_pre_order_date_radiobutton_&quot;+this.cpt.getId()+&quot;&apos;&gt;Pre-order date&lt;/label&gt; &lt;/div&gt;&quot;).insertBefore($(&quot;.uis_container.uis_pre_order_date&quot;,p.cpt.node));
HelpTagEditor(&quot;Choose this option to set a pre-order delivery date. Visitors will see the date of availability. The add to cart button will also be renamed to &apos;Pre-order&apos;.&lt;br&gt;On this date, the product will automatically switch to automatic stock mode with the configured stock number.&lt;br&gt;You can also choose your sentence color by clicking on the colored squares below.&quot;).appendTo($(&quot;.uis_pre_order_date &gt; div:first&quot;,p.cpt.node));
$(&quot;&lt;span class=&apos;uis_colors_wrapper&apos;&gt;&lt;span class=&apos;uis_custom_stock_sentence_color red selected_color&apos; data-color=&apos;red&apos;&gt;&lt;/span&gt;&lt;span class=&apos;uis_custom_stock_sentence_color orange&apos; data-color=&apos;orange&apos;&gt;&lt;/span&gt;&lt;span class=&apos;uis_custom_stock_sentence_color green&apos; data-color=&apos;green&apos; &gt;&lt;/span&gt;&lt;/span&gt;&quot;).appendTo($(&quot;.uis_stock_preview&quot;,p.cpt.node));
$(&quot;.uis_replenishment_date_input, .uis_pre_order_date_input&quot;,p.cpt.node).datetimepicker({format:&quot;LL&quot;}).on(&quot;dp.change&quot;,function(d){$(this).closest(&quot;.uis_stock_set_mode&quot;).find(&quot;input[type=radio]&quot;).trigger(&quot;change&quot;)
});
$(&quot;input.uis_set_stock&quot;,p.cpt.node).on($.change_events,function(){if(!$(&quot;[name=stock_mode][value=default_sentence]&quot;).is(&quot;:checked&quot;)){$(&quot;[name=stock_mode][value=default_sentence]&quot;,p.cpt.node).prop(&quot;checked&quot;,true).trigger(&quot;change&quot;)
}});
$(&quot;.uis_custom_stock_sentence_input&quot;,p.cpt.node).on($.change_events,function(){$(&quot;[name=stock_mode][value=custom_sentence]&quot;,p.cpt.node).prop(&quot;checked&quot;,true).trigger(&quot;change&quot;)
}).on(&quot;keyup&quot;,function(){var f=this;
var d=p.custom_stock_sentence(p.prodSelected,{stock_mode:&quot;custom_sentence&quot;,val:function(){return $(f).val()
}});
g.html(d[0]).removeClass(&quot;hight low uisa_s&quot;).addClass(d[1])
});
$(&quot;.uis_container.uis_replenishment_date&quot;,p.cpt.node).on($.change_events,function(){$(&quot;[name=stock_mode][value=replenishment]&quot;,p.cpt.node).prop(&quot;checked&quot;,true).trigger(&quot;change&quot;)
});
$(&quot;.uis_container.uis_pre_order_date&quot;,p.cpt.node).on($.change_events,function(){$(&quot;[name=stock_mode][value=pre_order]&quot;,p.cpt.node).prop(&quot;checked&quot;,true).trigger(&quot;change&quot;)
});
$.each([[&quot;default_sentence&quot;,function(){return parseInt($(&quot;.uis_set_stock&quot;,p.cpt.node).val())
},true],[&quot;custom_sentence&quot;,function(){return $(&quot;.uis_custom_stock_sentence_input&quot;,p.cpt.node).val()
}],[&quot;replenishment&quot;,function(){return $(&quot;.uis_replenishment_date_input&quot;,p.cpt.node).data(&quot;DateTimePicker&quot;).viewDate().utc().format()
}],[&quot;pre_order&quot;,function(){return $(&quot;.uis_pre_order_date_input&quot;,p.cpt.node).data(&quot;DateTimePicker&quot;).viewDate().utc().format()
}]],function(d,f){p.cpt.node.on(&quot;change&quot;,&quot;[name=stock_mode][value=&quot;+f[0]+&quot;]&quot;,function(){$(&quot;.uis_stock_set_mode&quot;,p.cpt.node).removeClass(&quot;selected&quot;);
$(this).closest(&quot;.uis_stock_set_mode&quot;).addClass(&quot;selected&quot;);
$(&quot;.uis_colors_wrapper&quot;,p.cpt.node).toggle(f[0]!=&quot;default_sentence&quot;);
if(f[0]==&quot;custom_sentence&quot;||f[0]==&quot;default_sentence&quot;){var n=p.custom_stock_sentence(p.prodSelected,{stock_mode:f[0],val:f[1],p_max:(f[2]?f[1]():null)});
g.html(n[0]).removeClass(&quot;hight low uisa_s&quot;).addClass(n[1])
}else{p.custom_stock_sentence(p.prodSelected,{stock_mode:f[0],val:f[1]}).done(function(){g.html(p.custom_stock_sentence_value[0]).removeClass(&quot;hight low uisa_s&quot;).addClass(p.custom_stock_sentence_value[1])
})
}})
});
$(&quot;.uis_container.uis_replenishment_date, .uis_container.uis_pre_order_date&quot;,p.cpt.node).click(function(d){if(!$(d.target).is(&quot;.glyphicon-time&quot;)){$(this).find(&quot;.glyphicon-time&quot;).click()
}});
var e={red:&quot;uisa_s&quot;,orange:&quot;low&quot;,green:&quot;hight&quot;};
$(&quot;.uis_custom_stock_sentence_color&quot;,p.cpt.node).click(function(d){$(&quot;.uis_custom_stock_sentence_color&quot;,p.cpt.node).removeClass(&quot;selected_color&quot;);
$(this).addClass(&quot;selected_color&quot;);
var f=$(this).data(&quot;color&quot;);
g.removeClass(&quot;hight low uisa_s&quot;).addClass(e[f]);
p.prodSelected.tmp_color=f
});
$(&quot;.uis_stock_sentence_show_more&quot;).click(function(d){$(&quot;.uis_more_stock_sentence_div&quot;,p.cpt.node).slideToggle(300);
$(this).closest(&quot;.uis_prod_bloc&quot;).toggleClass(&quot;open&quot;)
});
c.prod.clist.click(function(f){var d=$(f.target);
p.tmp_cat.removeAll(d.data(&quot;cat_id&quot;));
p._setProdCat()
});
var o=$(&quot;&lt;div class=&apos;uis_cat_select uis_cat_list disable_drag&apos;&gt;&lt;/div&gt;&quot;).appendTo(c.prod.cat);
c.prod.cat_none=$(&quot;&lt;span&gt;No categories yet.&lt;/span&gt;&quot;).appendTo(c.prod.cat).hide().append(HelpTagEditor(&quot;Click on the &apos;Manage categories&apos; button in the properties to add new categories.&quot;));
c.prod.cat_add=$(&quot;&lt;div class=&apos;uis_addCat_wrapper admin_elem ib&apos;&gt;&lt;span class=&apos;uis_addCat edit_btn&apos;&gt;Add a category to this product&lt;/span&gt;&lt;/div&gt;&quot;).appendTo(c.prod.cat.find(&quot;.uis_prod_cat_label&quot;)).click(function(){c.prod.cat_select.toggle();
return false
});
c.prod.cat_select=$(&quot;&lt;ul&gt;&lt;/ul&gt;&quot;).appendTo(c.prod.cat_add).hide().click(function(n){var f=$(n.target);
var d=f.data(&quot;cat_id&quot;);
if(d){p.tmp_cat.push(d)
}p._setProdCat()
});
HelpTagEditor(&quot;Strike-through price to show a promotion on this product&quot;).appendTo($(&quot;.uis_strike_conf&quot;,c.prod.main));
HelpTagEditor(&quot;You can set custom prices which depends on the ordered quantity or/and the customer visiting your website.&lt;br&gt;Custom prices can be percent discount of normal price or fixed unit price replacing the normal price.&lt;br&gt;To set volume prices, add new lines with member group set to Any.&lt;br&gt;To set member group prices, for example for your resellers, first you need to create a group and add members to it from My websites/Blocks/Member, then, here, choose the group in the list and set the quantity to one.&lt;br&gt;&lt;br&gt;Specific group prices have priority over quantity prices.&quot;).insertAfter(c.prod.main.find(&quot;.uis_custom_prices_header&quot;));
var j=$(&apos;&lt;div class=&quot;uis_cmd_p navbar_editor_blocks admin_elem&quot;&gt;&lt;/div&gt;&apos;).prependTo(c.prod.main);
c.prod.cancel=$(&quot;&lt;div class=&apos;helpEditor ned_item fonticon&apos; help=&apos;Cancel&apos; data-position=&apos;top&apos; data-color=&apos;blue&apos;&gt;&quot;+$.fn.fonticon(&quot;arrow_width_left&quot;)+&quot;&lt;/div&gt;&quot;).appendTo(j);
c.prod.del=$(&quot;&lt;div class=&apos;helpEditor ned_item fonticon&apos; help=&apos;Delete&apos; data-position=&apos;top&apos; data-color=&apos;blue&apos;&gt;&quot;+$.fn.fonticon(&quot;close&quot;)+&quot;&lt;/div&gt;&quot;).appendTo(j);
c.prod.copy=$(&quot;&lt;div class=&apos;helpEditor ned_item fonticon&apos; help=&apos;Duplicate&apos; data-position=&apos;top&apos; data-color=&apos;blue&apos;&gt;&quot;+$.fn.fonticon(&quot;dupplicate&quot;)+&quot;&lt;/div&gt;&quot;).appendTo(j);
c.prod.save=$(&quot;&lt;div class=&apos;helpEditor ned_item fonticon&apos; help=&apos;Save &amp;amp; Publish&apos; data-position=&apos;top&apos; data-color=&apos;blue&apos;&gt;&quot;+$.fn.fonticon(&quot;apply&quot;)+&quot;&lt;/div&gt;&quot;).appendTo(j);
c.prod.save.click(function(){p.saveProduct()
});
c.prod.copy.click(function(){p.saveProduct(true)
});
c.prod.cancel.click(function(){p.selectCat(null,p.prodSelected!=null)
});
c.prod.del.click(function(){if(p.send_once){return
}if(p.prodSelected&amp;&amp;p.prodSelected!=&quot;new&quot;){if(confirm(&quot;Do you really want to delete this product?\nIf you only want to hide it, untick the &apos;Show on the website&apos; checkbox.&quot;)){this.send_once=true;
p.cpt.ask({request:&quot;delete_product&quot;,id:c.prod.id.val()},function(f){UI_Store.update_nbr_products(f.nbr_products);
p.send_once=false;
UI_Store.del_product(p.prodSelected);
p.prodSelected=null;
sigCtl.emit(&quot;UI_Store.updateProdListGui&quot;)
},function(d){p.send_once=false;
dbg.error(&quot;Impossible to delete product.\n&quot;+d.join(&quot;\n&quot;))
})
}}else{p.prodSelected=null;
sigCtl.emit(&quot;UI_Store.updateProdListGui&quot;)
}});
c.prod.img.parent().click(function(){filesSelector.open({type:&quot;image&quot;,maxItems:25,files:((p.tmp_img&amp;&amp;p.tmp_img.length&gt;0&amp;&amp;!p.tmp_img[0].is_default)?p.tmp_img:[])},function(f){if(f&amp;&amp;f[0]){p.tmp_img=f;
UI_Store.setImage(p.n.prod.img,f,null,true,p.n.prod.imgs);
UI_Store._setZoomProduct(p.n.prod.img.find(&quot;img&quot;),f)
}})
});
c.prod.main.click(function(d){p.n.prod.cat_select.hide();
if($(d.target).hasClass(&quot;uis_desc&quot;)){return
}p.deselectEditor();
if(d.target.type&amp;&amp;(d.target.type.match(/textarea/i)||d.target.nodeName.match(/input/i))){return
}p.updateCptSize()
});
sigCtl.connect(&quot;Theme.changed&quot;,function(){p.reset=true
});
sigCtl.connect(&quot;CSS.changed&quot;,function(){p.reset=true
})
}else{c.prod.clist.click(function(f){var d=$(f.target);
p.selectCat(parseInt(d.data(&quot;cat_id&quot;)),true)
})
}p.createCartHeaderNeeded=false;
sigCtl.connect(&quot;UI_Store.createCartHeader&quot;,function(){if(p.createCartHeaderNeeded){return
}p.createCartHeaderNeeded=true;
p.next_show.done(function(){p.createCartHeaderNeeded=false;
p.createCartHeader()
})
});
p.updateCatListGuiNeeded=false;
sigCtl.connect(&quot;UI_Store.updateCatListGui&quot;,function(){if(p.updateCatListGuiNeeded){return
}p.updateCatListGuiNeeded=true;
p.next_show.done(function(){p.updateCatListGuiNeeded=false;
p.updateCatListGui(true)
})
});
p.updateProdListGuiNeeded=false;
sigCtl.connect(&quot;UI_Store.updateProdListGui&quot;,function(){if(p.updateProdListGuiNeeded){return
}p.updateProdListGuiNeeded=true;
p.next_show.done(function(){p.updateProdListGuiNeeded=false;
p.updateProdListGui()
})
});
var m=function(){try{if(v.selectedPageFg.getVisibleCpts().concat(v.page_bg.getVisibleCpts()).find(function(f){return f.component_type.class_name==&quot;UI_Cart&quot;
})){p.n.cart.main.addClass(&quot;to_hide&quot;)
}else{p.n.cart.main.removeClass(&quot;to_hide&quot;)
}}catch(d){setTimeout(function(){m()
},500)
}};
p.cpt.onDisplayed.then(function(){if(!p.cpt.id){m()
}});
sigCtl.connect(&quot;UI_Cart.added&quot;,m);
sigCtl.connect(&quot;UI_Cart.removed&quot;,m);
sigCtl.getVariable(&quot;PageBg.shown&quot;,function(d){sigCtl.connect(&quot;Page.shown&quot;,function(n,f){p.next_show.then(function(){if(f==p.cpt.page){m()
}})
})
});
sigCtl.connect(&quot;UI_Store.updateGdpr&quot;,function(){p.initGdpr()
});
this._setProdListStyle();
UI_Store.getCategories(this.cpt).done(function(){UI_Store.loadCookie();
sigCtl.emit(&quot;UI_Store.createCartHeader&quot;)
});
$.extend(this,componentSearchBar);
this.search_field_available=true;
this.bindSearch();
this.onPropertyChanged([&quot;search_field&quot;]);
this.updateCptClass();
var b=function(){setTimeout(function(){p.next_show.done(function(){p.updateCptClass()
})
},100)
};
$(window).resize(b);
sigCtl.connect(&quot;Page.shown&quot;,b)
},onPropertyChanged:function(a){var b=this;
if(a.include(&quot;search_field&quot;)){this.n.search.toggle(!!(this.search_field_available&amp;&amp;this.cpt.data.search_field))
}if(a.include(&quot;manage&quot;)){UI_Store.load_categories={};
UI_Store.getCategories(this.cpt).done(function(c){b.cpt.data.show_cat_all=c.show_cat_all
});
UI_Store.update_gdpr()
}if(a.include(&quot;payment_conf&quot;)){UI_Store.getPaymentConf(function(){UI_Store._cur=null;
UI_Store.updateCartHtml();
sigCtl.emit(&quot;UI_Store.createCartHeader&quot;);
sigCtl.emit(&quot;UI_Store.updateCart&quot;);
sigCtl.emit(&quot;UI_Store.updateProdListGui&quot;)
})
}if(a.include(&quot;style&quot;)){if(this.cpt.data.style==&quot;m&quot;&amp;&amp;!$(&quot;.accept_bg&quot;).length){statusController.message(&quot;This functionality is not available for your template. Please change your template to either Cristal or Elegance, thanks to the button below.&quot;,&quot;warning&quot;,5000)
}this._setProdListStyle();
this.updateProdListGui();
this._changeProperties()
}if(a.include(&quot;auto_size&quot;)){this.updateCptSize()
}if(a.include(&quot;rows&quot;)){this.items_per_row=null;
if(!this.prodSelected){clearTimeout(this.rwto);
this.rwto=setTimeout(function(){b.updateProdListGui()
},500)
}}if(a.include(&quot;show_stocks&quot;)||a.include(&quot;stock_limit&quot;)||a.include(&quot;show_price_from&quot;)){this.updateProdListGui();
this._changeProperties()
}if(a.include(&quot;show_stocks&quot;)&amp;&amp;this.cpt.data.show_stocks){versionController.disabledOnViewer(&quot;uis_stock&quot;)
}},_changeProperties:function(){$(&quot;.uis_prop_sitew_sub&quot;).hide();
if(this.cpt.data.show_stocks){$(&quot;.uis_prop_sitew_sub&quot;).show()
}},onSelect:function(){var a=this;
this.n.main.addClass(&quot;block_selected&quot;);
a._updateCptSize();
this.updateGdpr();
this._changeProperties();
if(this.n.prod.main.is(&quot;:visible&quot;)){this.n.prod.img.editable_node({type:&quot;image&quot;});
this.n.prod.desc.editable_node({type:&quot;text&quot;})
}},onDeselect:function(){this.n.main.removeClass(&quot;block_selected&quot;);
this._updateCptSize();
this.n.prod.img.editable_node({action:&quot;destroy&quot;});
this.n.prod.desc.editable_node({action:&quot;destroy&quot;})
},onEdit:function(){},onShow:function(){if(this.cpt.id&amp;&amp;UI_Store.load_categories[this.cpt.id]&amp;&amp;UI_Store.load_categories[this.cpt.id].state()==&quot;resolved&quot;){UI_Store.load_categories[this.cpt.id].then(function(a){UI_Store.update_category_list(a.categories)
})
}if(this.reset){this.reset=null;
this._setProdListStyle();
this.selectCat(null,true)
}else{this._setUrl()
}this.n.list.find(&quot;h3&quot;).ellipsis();
$(&quot;input&quot;,this.n.search).val(&quot;&quot;).change();
this.next_show.resolve()
},onHide:function(){this.next_show=$.Deferred()
},onHashChange:function(){UI_Store._setZoomProduct(this.n.prod.main,null,true);
this._setUrl()
},deselectEditor:function(){if(v.mode==&quot;editor&quot;){editorController.deselect();
this.n.prod.desc.height(&quot;auto&quot;);
this.n.prod.desc.height(this.n.prod.desc.height());
if(this.n.prod.desc.is(&quot;:visible&quot;)){this.n.prod.desc.editable_node({type:&quot;text&quot;})
}}},saveProduct:function(d){if(this.send_once){return
}var a=this;
var c=this.n;
if(this.prodSelected&amp;&amp;this.prodSelected!=&quot;new&quot;&amp;&amp;this.prodSelected.desc==undefined){return setTimeout(function(){a.saveProduct(d)
},100)
}if(d){this.prodSelected=&quot;new&quot;;
c.prod.id.val(&quot;&quot;)
}this.deselectEditor();
this.send_once=true;
var b=[];
$(&quot;.uis_custom_prices_tbody tr&quot;,c.prod.main).each(function(){var f=$(this);
var e=parseFloat($(&quot;.&quot;+f.data(&quot;type&quot;),f).val());
b.push({type:f.data(&quot;type&quot;),value:(f.data(&quot;type&quot;)==&quot;amount&quot;?UI_Store.convert_with_vat(e):e),group_id:$(&quot;select[name=member_groups]&quot;,f).val(),quantity:parseInt($(&quot;.quantity&quot;,f).val())})
});
this.cpt.ask({request:&quot;update_product&quot;,id:c.prod.id.val(),name:c.prod.name.find(&quot;input&quot;).val(),desc:editorController.getContent(c.prod.desc),opts:this.tmp_opts,stocks:this.tmp_stocks,img:this.tmp_img,price:UI_Store.convert_with_vat(c.prod.price.find(&quot;input&quot;).val()),weight:c.prod.hidden.find(&quot;.uis_weight input&quot;).val(),reference:c.prod.hidden.find(&quot;.uis_ref input&quot;).val(),private_notes:c.prod.hidden.find(&quot;.uis_private_notes textarea&quot;).val(),order:c.prod.hidden.find(&quot;.uis_order input&quot;).val(),digital:c.prod.digital.find(&quot;input&quot;).is(&quot;:checked&quot;),attachments:(this.attachments_tmp&amp;&amp;this.attachments_tmp.length&gt;0)?this.attachments_tmp:null,strike:UI_Store.convert_with_vat(c.prod.main.find(&quot;.uis_strike_input input&quot;).val()),seo_description:$(&quot;.uis_seo_description textarea&quot;,c.prod.main).val(),max:c.prod.max?c.prod.max.val():999,visible:c.prod.visi.find(&quot;input&quot;).is(&quot;:checked&quot;),category_ids:a.tmp_cat,stock_mode:$(&quot;[name=stock_mode]:checked&quot;,this.cpt.node).val(),custom_stock_sentence:$(&quot;.uis_custom_stock_sentence_input&quot;,this.cpt.node).val(),custom_stock_sentence_color:$(&quot;.uis_custom_stock_sentence_color.selected_color&quot;,this.cpt.node).data(&quot;color&quot;),replenishment_date:$(&quot;.uis_replenishment_date_input&quot;).data(&quot;DateTimePicker&quot;).viewDate().utc().format(),pre_order_date:$(&quot;.uis_pre_order_date_input&quot;).data(&quot;DateTimePicker&quot;).viewDate().utc().format(),offset_zone:new Date().getTimezoneOffset(),custom_prices:b},function(e){UI_Store.update_nbr_products(e.nbr_products);
a.send_once=false;
if(a.prodSelected&amp;&amp;a.prodSelected!=&quot;new&quot;){UI_Store.del_product(a.prodSelected)
}UI_Store.add_product(e.product);
a.prodSelected=null;
sigCtl.emit(&quot;UI_Store.updateProdListGui&quot;);
if(e.product.disabled_on_viewer){versionController.disabledOnViewer(&quot;uis_unlimited_products&quot;)
}},function(e){a.send_once=false;
dbg.error(&quot;Impossible to update product.\n&quot;+e.join(&quot;\n&quot;));
statusController.message(e.join(&quot;\n&quot;),&quot;warning&quot;)
})
},updateCptClass:function(){this.cpt.node.removeClass(&quot;uis_s0 uis_s1 uis_s2 uis_prod_responsive uis_sf&quot;);
var a=this.cpt.node.width(),b=&quot;uis_s2&quot;;
if(a&lt;400){b=&quot;uis_sf&quot;
}else{if(a&lt;700){b=&quot;uis_s0&quot;
}else{if(a&lt;1000){b=&quot;uis_s1&quot;
}}}if(a&lt;(({s:450}[this.cpt.data.style])||580)){this.cpt.node.addClass(&quot;uis_prod_responsive&quot;);
this.cpt.node.find(&quot;.uis_total_label,.uis_coup&quot;).attr(&quot;colspan&quot;,2)
}else{this.cpt.node.find(&quot;.uis_total_label,.uis_ship,.uis_coup&quot;).attr(&quot;colspan&quot;,3)
}this.cpt.node.addClass(b)
},onResizeStop:function(){if(this.cpt.W()&lt;320){this.cpt.setSize({w:320})
}this.onResize();
this.items_per_row=null
},onResize:function(){var a=this.n.ul.find(&quot;li:last&quot;);
this.ratio=a.height()/a.width();
this.updateCptClass();
this.setImagesRatio()
},onSave:function(){UI_Store.getCategories(this.cpt)
},onRemove:function(){this.next_show=$.Deferred();
UI_Store.remCpt(this.cpt)
},updateCptSize:function(){Misc.deferred_method(this,this._updateCptSize,200)
},_updateCptSize:function(b){if(this.cpt.data.auto_size){b|=0;
var a=this;
a.n.main.css(&quot;overflow-y&quot;,&quot;hidden&quot;);
a.cpt.setSize({h:10000});
a.cpt.setSize({h:Math.max(this.cpt.data.search_field?600:0,a.size_getter_el.offsetTop+50),w:a.cpt.W()&gt;320?null:320});
if(b&lt;3){b+=1;
setTimeout(function(){a._updateCptSize(b)
},(b)*100)
}}else{this.n.main.css(&quot;overflow-y&quot;,&quot;auto&quot;);
v.checkHeight()
}},updateCatListGui:function(c){if(this.cpt.idserver){var a=this;
this.n.warn.hide();
if(c){this.cat_ids=(this.cpt.data.show_cat_all)?[0]:[];
for(var b in UI_Store.categories){if(UI_Store.categories[b].stores.include(this.cpt.idserver)){this.cat_ids.push(parseInt(b))
}}this.cat_ids.sort(function(d,e){return UI_Store.categories[d].order-UI_Store.categories[e].order
});
if(this.cat_ids.find_all(function(d){return d!=0
}).length==1&amp;&amp;this.cpt.data.show_cat_all){this.cat_ids.removeAll(0)
}}if(this.cat_ids.length&gt;1){this.n.cat.html(&quot;&lt;ul&gt;&quot;+this.cat_ids.filter(function(d){return d!=0||a.cat_ids.length&gt;2
}).collect(function(d){return&quot;&lt;li data-cat_id=&apos;&quot;+d+&quot;&apos; class=&apos;site_categ&apos;&gt;&quot;+$.trim(UI_Store.categories[d].name)+&quot;&lt;/li&gt;&amp;nbsp; &quot;
}).join(&quot;&quot;)+&quot;&lt;/ul&gt;&quot;);
this.n.cat.find(&quot;li&quot;).each(function(e,d){d=$(d);
d.click(function(){a.selectCat(parseInt(d.data(&quot;cat_id&quot;)),a.prodSelected!=null)
})
})
}else{this.n.cat.html(&quot;&lt;ul&gt;&lt;li class=&apos;site_button&apos;&gt;&amp;lt;&amp;lt; Back to product list&lt;/li&gt;&lt;/ul&gt;&quot;).find(&quot;li&quot;).click(function(){a.selectCat(null,a.prodSelected!=null,undefined,a.pageSelected||0)
})
}$(&quot;&lt;li class=uis_search_back&gt;Back to search results&lt;/li&gt;&quot;).click(function(){a.triggerSearch()
}).appendTo($(&quot;ul&quot;,this.n.cat));
this.showCatList();
if(this.prodIdToSelect){this.selectProd.apply(this,this.prodIdToSelect);
this.prodIdToSelect=null
}else{if(this.prodSelected){this._setProdCat()
}}if(v.selectedPageFg.cptUrl&amp;&amp;v.selectedPageFg.cptUrl.match(/s\db/)){this.n.catal.hide()
}else{this.n.catal.show();
this.selectList(this.catSelected,true,this.prodSelected!=null)
}}},selectList:function(a){if(!a){this.selectCat.apply(this,arguments)
}else{if(a[0]==&quot;search_query&quot;){this.selectSearch(a[1],0)
}else{arguments[0]=a[1];
this.selectCat.apply(this,arguments)
}}},showCatList:function(){this.n.cat.toggle(!!(this.prodSelected||(this.catSelected&amp;&amp;this.catSelected[0]==&quot;category_id&quot;&amp;&amp;this.cat_ids.length&gt;1)));
var a=!(this.prodSelected&amp;&amp;this.catSelected&amp;&amp;this.catSelected[0]==&quot;search_query&quot;);
$(&quot;.uis_search_back&quot;,this.n.cat).toggle(!a);
$(&quot;li:not(.uis_search_back)&quot;,this.n.cat).toggle(a);
$(&quot;.uis_search_suggest&quot;,this.n.main).removeClass(&quot;uis_typing&quot;)
},selectCat:function(h,e,a,d){if($.fn.hash_size(UI_Store.categories)==0){this.catSelected=[&quot;category_id&quot;,h];
return
}var g=this.pageSelected;
this.pageSelected=d||0;
this.hideCart();
if(h==null||!UI_Store.categories[h]||!(h==0&amp;&amp;this.cpt.data.show_cat_all||UI_Store.categories[h].stores.include(this.cpt.idserver))){e=true;
h=this.cat_ids[0]
}if(h!=(this.catSelected&amp;&amp;this.catSelected[1])||g!=this.pageSelected||e){var b=$();
if(this.n.cat.find(&quot;li&quot;).length&gt;1){b=this.n.cat.find(&quot;li[data-cat_id=&quot;+h+&quot;]&quot;)
}var f=UI_Store.categories[h];
if(!f){return
}if(!a&amp;&amp;this.preventNotSaved()){return
}this.catSelected=[&quot;category_id&quot;,h];
this.n.cat.find(&quot;li&quot;).removeClass(&quot;selected&quot;);
b.addClass(&quot;selected&quot;);
if(!a){this.updateProdListGui(e&amp;&amp;a!=false)
}}},preventNotSaved:function(){return v.mode==&quot;editor&quot;&amp;&amp;this.prodSelected&amp;&amp;false
},selectSearch:function(c,b){$(&quot;input&quot;,this.n.search).val(c);
this.n.search.toggleClass(&quot;ui_search_result&quot;,c!=&quot;&quot;);
this.prodSelected=null;
if(c==&quot;&quot;){this.selectCat(null)
}else{this.catSelected=[&quot;search_query&quot;,c];
this.showCatList();
this.n.list.hide();
var d=this.pageSelected;
this.pageSelected=b||0;
this.hideCart();
var a=this;
$.when(UI_Store.cache.get(&quot;search:&quot;+c,function(){a.searchLoading(1);
return a.cpt.ask({request:&quot;search_query&quot;,query:c,version_id:v.id}).always(function(){a.searchLoading(-1)
})
})).done(function(){a.updateProdListGui()
})
}},updateProdListGui:function(d){var a=this;
var b=this._getProdListSort();
var c=$.Deferred();
var e=[];
if(!this.catSelected){return
}if(this.catSelected[0]==&quot;category_id&quot;){var f=$.Deferred();
if(this.cat_ids.length&gt;1&amp;&amp;this.catSelected[1]==0){f=UI_Store.get_all_specific_category(this.cat_ids.filter(function(g){return g!=0
}),this.cpt.id)
}else{f.resolve(UI_Store.categories[this.catSelected[1]])
}f.then(function(g){if(!g){return
}if(v.selectedPageFg==a.cpt.page&amp;&amp;(!a.prodSelected||d)&amp;&amp;(!a.cpt.page.cptUrl||a.cpt.page.cptUrl.substr(1,1)==&quot;s&quot;)){a.cpt.page.setCptUrl(&quot;/s&quot;+(g.id||0)+&quot;c&quot;+(a.pageSelected?a.pageSelected:&quot;&quot;)+&quot;/&quot;+g.name.to_alphanumeric(),g.name,a.cpt)
}e=(b[0]==&quot;p&quot;?g.products_by_price:g.products).slice();
if(b[1]){e.reverse()
}a.n.sort.removeClass(&quot;uis_sort_hidden&quot;).find(&quot;span&quot;).removeClass(&quot;uis_ss uis_ssa&quot;);
a.n.sort.find(&quot;span.uis_s&quot;+b[0]).addClass(&quot;uis_ss&quot;+(b[1]?&quot; uis_ssa&quot;:&quot;&quot;));
a.n.search_header.hide();
c.resolve()
})
}else{e=UI_Store.cache.get(&quot;search:&quot;+this.catSelected[1]).results.products;
this.cpt.page.setCptUrl(&quot;/s0s&quot;+(this.pageSelected||&quot;0&quot;)+&quot;/&quot;+encodeURI(this.catSelected[1]),this.catSelected[1],this.cpt);
this.n.sort.addClass(&quot;uis_sort_hidden&quot;);
this.n.search_header.show();
$(&quot;.uis_nbr_search_results&quot;,this.n.search_header).html(sprintf(&quot;%1$d results for %2$s&quot;,e.length,&quot;&lt;span&gt;&quot;+$(&quot;&lt;div&gt;&quot;).text(this.catSelected[1]).html()+&quot;&lt;/span&gt;&quot;));
c.resolve()
}c.then(function(){a.n.pages.empty();
if(e.length&gt;0){if(!a.prodSelected||(d&amp;&amp;v.selectedPageFg.cptUrl&amp;&amp;!v.selectedPageFg.cptUrl.match(/s\d+p/))){a.showList()
}if(!a.items_per_row){a._prodRow()
}var h=0,g=a.cpt.data.rows*a.items_per_row;
if(g&gt;0&amp;&amp;e.length&gt;g){var k=Math.ceil(e.length/g);
a.pageSelected=Math.min(a.pageSelected,k-1);
$.fn.paginate(a.n.pages.show(),k,a.pageSelected,1,3,function(l){if(a.pageSelected!=l){a.pageSelected=l;
a.updateProdListGui();
a.scroll()
}});
e=e.slice(a.pageSelected*g,(a.pageSelected+1)*g)
}a.n.ul.empty();
var j=[],i={};
e.each(function(l){var m=UI_Store.products[l];
if(m){a._drawProdListItem(m,$(&quot;&lt;li&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;/li&gt;&quot;).appendTo(a.n.ul))
}else{j.push(l);
i[l]=$(&quot;&lt;li&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;div class=uis_list_img&gt;&lt;img src=&apos;/assets/loading/66x66.gif&apos; class=&apos;no_css&apos;&gt;&lt;/div&gt;&lt;div class=uis_list_price&gt;&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&quot;).appendTo(a.n.ul)
}});
if(j.length&gt;0){UI_Store.getProducts(j).done(function(){j.each(function(l){a._drawProdListItem(UI_Store.products[l],i[l])
});
a.setImagesRatio()
})
}a.setImagesRatio()
}else{a.n.ul.html(&quot;No products yet...&quot;);
a.showList()
}if(v.mode==&quot;editor&quot;){$(&quot;&lt;li class=&apos;it admin_elem&apos;&gt;&quot;).attr(&quot;title&quot;,&quot;Create a new product&quot;).html(&quot;&lt;div&gt;&lt;div class=&apos;fonticon admin_title&apos;&gt;&quot;+$.fn.fonticon(&quot;add&quot;)+&quot;&lt;/div&gt;&lt;div class=&apos;admin_title&apos;&gt;Create a new product &lt;span class=&apos;uis_limit_nbr_product upgrade_icon ui_bg&apos;&gt;&lt;img src=&apos;/images/blog/editor_icons/upgrade_icon.svg&apos;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&quot;).addClass(&quot;editor_add_item&quot;).prependTo(a.n.ul).on(&quot;click&quot;,function(){a.selectProd()
});
UI_Store.update_nbr_products();
a.updateCptSize()
}})
},showList:function(){this.prodSelected=null;
if(v.mode==&quot;editor&quot;){this.deselectEditor()
}this.n.prod.main.hide();
this.showCatList();
this.n.list.show()
},_getProdListSort:function(){return(this.cpt.data.sort||[&quot;n&quot;,true])
},_setProdListSort:function(a,b){this.pageSelected=0;
if(v.mode==&quot;editor&quot;){this.cpt.setData(&quot;sort&quot;,[a,b]);
statusController.message(sprintf(&quot;When the Store block is loaded, products will now be sorted by &lt;b&gt;%1$s&lt;/b&gt; in &lt;b&gt;%2$s order&lt;/b&gt;. Publish your website to apply changes.&quot;,a==&quot;p&quot;?&quot;prices&quot;:&quot;names&quot;,b?&quot;ascending&quot;:&quot;descending&quot;))
}else{this.cpt.data.sort=[a,b]
}},_setProdListStyle:function(){this.n.main.add(this.n.ul).removeClass(&quot;uisl_s uisl_l uisl_m uisl_h&quot;).addClass(&quot;uisl_&quot;+(this.cpt.data.style||&quot;l&quot;));
this.items_per_row=null;
this.setImagesRatio()
},_prodRow:function(){this.pageSelected=0;
this.n.ul.empty();
this.items_per_row=0;
var a,b=$(&quot;&lt;li&gt;&lt;/li&gt;&quot;).appendTo(this.n.ul);
if(b.width()==0){return
}do{this.items_per_row+=1;
a=$(&quot;&lt;li&gt;&lt;/li&gt;&quot;).appendTo(this.n.ul)
}while(b[0].offsetTop==a[0].offsetTop&amp;&amp;this.items_per_row&lt;10);
this.n.ul.empty()
},custom_stock_sentence:function(c,e){var b=null;
var k=this;
e=e||{};
e.val=e.val||function(){return null
};
var a={red:&quot;uisa_s&quot;,orange:&quot;low&quot;,green:&quot;hight&quot;};
var l,i;
var j,f;
if(e.p_max!=null){j=e.p_max
}else{j=this._getMaxStock(c);
if(j&gt;c.max){j=c.max
}}if(e.stock_mode){f=e.stock_mode
}else{f=c.stock_mode
}var h=(j==0);
if(v.mode==&quot;editor&quot;&amp;&amp;(f==&quot;replenishment&quot;||f==&quot;pre_order&quot;)&amp;&amp;e.val()){var d=$.Deferred();
this.cpt.ask({request:&quot;now_custom_stock_sentence&quot;,date:e.val(),mode:f,offset_zone:new Date().getTimezoneOffset()},function(m){k.custom_stock_sentence_value=[l,i,h];
if(f==&quot;replenishment&quot;){l=sprintf(&quot;Available in %1$s&quot;,m.date)
}else{h=false;
l=sprintf(&quot;Available on %1$s&quot;,m.date)
}i=a[c.tmp_color||c.custom_stock_sentence_color];
k.custom_stock_sentence_value=[l,i,h];
d.resolve()
});
return d
}else{switch(f){case&quot;custom_sentence&quot;:l=e.val()||c.custom_stock_sentence;
break;
case&quot;replenishment&quot;:l=sprintf(&quot;Available in %1$s&quot;,b||c.custom_stock_sentence);
break;
case&quot;pre_order&quot;:h=false;
l=sprintf(&quot;Available on %1$s&quot;,b||c.custom_stock_sentence);
break;
default:var g=this.cpt.data.stock_limit||10;
if(j&gt;1&amp;&amp;j&lt;=g&amp;&amp;this.show_stocks_available){l=sprintf(&quot;Only %1$d products left&quot;,j);
i=a.orange
}else{if(j&gt;g||(!this.show_stocks_available&amp;&amp;j&gt;0)){l=&quot;In stock&quot;;
i=a.green
}else{if(j==1&amp;&amp;this.show_stocks_available){l=&quot;Only one product left&quot;;
i=a.orange
}else{l=UI_Store.conf.sold_out_text||&quot;Sold out&quot;;
i=a.red
}}}break
}if(f&amp;&amp;f!=&quot;default_sentence&quot;){i=a[c.tmp_color||c.custom_stock_sentence_color]
}if(!this.cpt.data.show_stocks){l=&quot;&quot;
}return[l,i,h]
}},_drawProdListItem:function(a,b){var i=this;
var d=document.createElement(&quot;textarea&quot;);
var c=(a.visible&amp;&amp;a.disabled_on_viewer&amp;&amp;v.mode==&quot;editor&quot;);
if(c){b.addClass(&quot;disabled_on_viewer&quot;)
}d.innerHTML=a.summary;
b.attr(&quot;title&quot;,d.value);
b.addClass(&quot;uis_prod_&quot;+a.id+&quot; &quot;+a.category_ids.map(function(j){return&quot;uis_cat_&quot;+j
}).join(&quot; &quot;));
var e=null;
if($.fn.hash_size(UI_Store.conf.methods)&gt;0){if(a.opts.length==0&amp;&amp;a.max&gt;0){e=[&quot;p_buy&quot;,&quot;cart&quot;,&quot;Buy&quot;]
}else{if(i._getMaxStock(a)&amp;&amp;a.opts.length){e=[&quot;&quot;,&quot;exe&quot;,&quot;Choose options&quot;]
}}}var f=UI_Store.unitPrice(a,1,UI_Store.current_member);
b.html(&quot;&lt;div class=&apos;uis_list_img&apos;&gt;&lt;/div&gt;&lt;h3&gt;&lt;span class=&apos;font_title_4&apos;&gt;&quot;+(c?&apos;&lt;span class=&quot;upgrade_icon ui_bg&quot;&gt;&lt;img src=&quot;/images/blog/editor_icons/upgrade_icon.svg&quot;&gt;&lt;/span&gt;&apos;:&quot;&quot;)+(a.visible?&quot;&quot;:&quot;&lt;img src=&apos;/assets/icons/ghost.png&apos; title=&apos;Product not visible on your website&apos; width=16 height=16/&gt;&quot;)+a.name+&quot;&lt;/span&gt;&quot;+(this.cpt.data.style==&quot;h&quot;?&quot;&lt;span style=&apos;display:block;&apos;&gt;&quot;+a.summary+&quot;&lt;/span&gt;&quot;:&quot;&quot;)+&quot;&lt;/h3&gt;&lt;div class=&apos;uis_list_price&apos;&gt;&quot;+((i.cpt.data.show_price_from&amp;&amp;a.opts.length&gt;0&amp;&amp;a.opts.find(function(k){for(var j in k.options){if(parseFloat(k.options[j].p)&gt;0){return true
}}}))?&quot;Price from &quot;:&quot;&quot;)+((a.strike&amp;&amp;a.strike&gt;f)?&quot;&lt;span class=&apos;uis_ps&apos;&gt;&quot;+UI_Store.show_price(f)+&quot;&lt;/span&gt;&lt;span class=&apos;uis_list_strike&apos;&gt;&quot;+UI_Store.show_price(a.strike)+&quot;&lt;/span&gt;&quot;:UI_Store.show_price(f))+&quot;&lt;/div&gt;&quot;+(e?&quot;&lt;div class=&apos;ov_prod&apos;&gt;&lt;div class=&apos;&quot;+e[0]+&quot;&apos;&gt;&lt;div class=&apos;fonticon&apos;&gt;&quot;+$.fn.fonticon(e[1])+&quot;&lt;/div&gt;&lt;div class=&apos;ov_text&apos;&gt;&quot;+e[2]+&quot;&lt;/div&gt;&lt;/div&gt;&lt;div class=&apos;ov_added&apos;&gt;&lt;/div&gt;&lt;/div&gt;&quot;:(this.cpt.data.style==&quot;h&quot;?&quot;&lt;div class=&apos;ov_prod&apos;&gt;&lt;/div&gt;&quot;:&quot;&quot;)));
var g=i.custom_stock_sentence(a);
$(&quot;&lt;span id=&apos;uis_custom_stock_sentence_product_list&quot;+a.id+&quot;&apos; class=&apos;uis_custom_stock_sentence_product_list &quot;+g[1]+&quot;&apos;&gt;&lt;/span&gt;&quot;).text(g[0]).insertAfter(b.find(&quot;.uis_list_price&quot;,i.cpt.node));
b.find(&quot;.uis_list_price&quot;).toggle(!g[2]);
b.find(&quot;h3&quot;).ellipsis();
b.click(function(){i.selectProd(a.id)
});
b.find(&quot;.ov_prod .p_buy&quot;).on(&quot;click&quot;,function(){if(v.mode==&quot;viewer&quot;&amp;&amp;UI_Store.checkCartOptions(i.n.prod.opt,a.opts,true)){var j=$(this).parents(&quot;li:first&quot;);
j.addClass(&quot;added&quot;);
setTimeout(function(){j.removeClass(&quot;added&quot;)
},1500);
UI_Store.updateItem(a,1,&quot;[]&quot;);
i.addToCart(a);
return false
}});
var h=b.find(&quot;.uis_list_img&quot;);
if(this.cpt.data.style==&quot;h&quot;){UI_Store.setImage(h,a.img,[null,120])
}else{UI_Store.setImage(h,a.img)
}h.find(&quot;img&quot;).addClass(&quot;img_height&quot;);
a.img_loaded=true
},setImagesRatio:function(){var b,a=this;
this.n.ul.find(&quot;.uis_list_img &gt; div&quot;).hide(0).promise().done(function(){a.n.ul.find(&quot;.uis_list_img img&quot;).each(function(c,e){var f=$(e);
if(/loading/.test(f.attr(&quot;src&quot;))){return
}var d=f.closest(&quot;.uis_list_img&quot;);
b=b||(d.height()/d.width());
f.on(&quot;load&quot;,function(){if(b&lt;=f.height()/f.width()){f.addClass(&quot;img_height&quot;)
}else{f.removeClass(&quot;img_height&quot;)
}f.css(&quot;opacity&quot;,1)
})
});
a.n.ul.find(&quot;.uis_list_img &gt; div&quot;).show()
})
},refreshRatio:function(){var a=this,b=this.n.ul.find(&quot;li:last .uis_list_img&quot;);
b.find(&quot;img&quot;).hide(0,function(){a.ratio=b.height()/b.width();
$(this).show();
a.n.ul.find(&quot;.uis_list_img &gt; div&quot;).show()
})
},addToCart:function(e,d,c){var a=this;
var d=d||&quot;show_confirm&quot;;
if(d==&quot;show_confirm&quot;){if(this.cpt.node.hasClass(&quot;uis_prod_responsive&quot;)){tb_show_viewer(null,&quot;#TB_inline?width=300&amp;inlineId=uis_add_to_cart&quot;)
}else{tb_show_viewer(null,&quot;#TB_inline?width=900&amp;inlineId=uis_add_to_cart&quot;)
}var f=UI_Store.cart.num;
$(&quot;.uis_nbr_items&quot;,$(&quot;#TB_window&quot;)).text(sprintf((f==1?&quot; (%1$s item)&quot;:&quot; (%1$s items)&quot;),f));
$(&quot;.uis_view_cart&quot;,$(&quot;#TB_window&quot;)).click(function(){a.showCart();
tb_remove()
});
$(&quot;.uis_view_cart,.uis_checkout&quot;,$(&quot;#TB_window&quot;)).click(function(){a.showCart();
tb_remove()
});
$(&quot;.uis_shopping&quot;,$(&quot;#TB_window&quot;)).click(function(){a.selectCat(a.catSelected?a.catSelected[1]||null:null,a.prodSelected!=null,undefined,a.pageSelected||0);
tb_remove()
})
}else{if(d==&quot;show_form&quot;){this.showCart();
var b=false;
$.each(UI_Store.conf.options,function(h,g){if(g.label||(g[&quot;&gt;&quot;]&amp;&amp;g[&quot;&gt;&quot;]&gt;0)){b=true
}});
if(!UI_Store.conf.terms&amp;&amp;!b){this.n.bill.find(&quot;.uis_bsa[method=&quot;+c.store_provider+&quot;]&quot;).trigger(&quot;click&quot;)
}}else{if(d==&quot;show_cart&quot;){this.showCart()
}}}if(v.features.uis_mailing){this.cpt.ask({request:&quot;last_add_to_cart&quot;})
}},selectProd:function(e,d){if(this.cat_ids.length==0){return this.prodIdToSelect=[e,d]
}var c=this;
this.hideCart();
this.n.ul.html(&quot;&quot;);
if(e){$.when(UI_Store.products[e]||UI_Store.getProducts([e])).done(function(){var a=UI_Store.products[e];
if(a!=c.prodSelected){c.prodSelected=a;
c._setProdGui(a);
if(v.mode==&quot;editor&quot;){blockSelector.deselect();
blockSelector.select(c.cpt.node)
}v.scroll_to_component(c.cpt)
}else{c._setImagesAndZoom(a)
}c.cpt.page.setCptUrl(&quot;/s&quot;+a.id+&quot;p/&quot;+a.name.to_alphanumeric(),$(&quot;&lt;p&gt;&quot;).html(a.name).text(),true);
setTimeout(function(){var g={};
if(d&amp;&amp;d.a==&quot;a&quot;&amp;&amp;!a.opts.find(function(h){return(h[&quot;&gt;&quot;]&amp;&amp;h[&quot;&gt;&quot;]&gt;0)||h.label
})){UI_Store.updateItem(a,(d.n||1),c.optionsVal()||&quot;&quot;);
var f=false;
if(d.f==&quot;s&quot;||d.p){$.each(UI_Store.conf.methods,function(h,i){if(i.id==d.p){f=true;
g.store_provider=h
}})
}c.addToCart(a,(d.f==&quot;c&quot;?&quot;show_cart&quot;:(f?&quot;show_form&quot;:&quot;show_confirm&quot;)),g)
}c._setProdAddToCart(a)
},500)
})
}else{if(v.mode==&quot;editor&quot;){this.prodSelected=&quot;new&quot;;
var b={id:&quot;&quot;,name:&quot;Product name&quot;,reference:&quot;&quot;,desc:&quot;&quot;,img:[{thumbnails:{small:&quot;/images/thumbnails/default_prod.png&quot;},width:350,url:&quot;/images/thumbnails/default_prod.png&quot;,height:350,name:&quot;default_prod.png&quot;,id:0,removable:false,is_default:true}],price:10,strike:0,opts:[],stocks:{},max:99,visible:true,weight:null,category_ids:(this.catSelected&amp;&amp;this.catSelected[0]==&quot;category_id&quot;?[this.catSelected[1]]:[])};
this._setProdGui(b)
}else{this.showList()
}}},_setProdGui:function(d){var e=this.n;
var a=this;
e.prod.id.val(d.id);
function b(){editorController.setContent(e.prod.desc,d.id?UI_Store.products[d.id].desc:d.desc);
e.prod.shipping_infos.html(d.id&amp;&amp;UI_Store.products[d.id]&amp;&amp;UI_Store.products[d.id].shipping_infos?UI_Store.products[d.id].shipping_infos.text:&quot;&quot;);
UI_Store.format_prices(e.prod.shipping_infos);
e.prod.desc.editable_node({type:&quot;text&quot;});
var f=e.prod.desc.closest(&quot;.uis_desc_wrapper&quot;);
if(UI_Store.products[d.id]&amp;&amp;v.mode==&quot;viewer&quot;){f.toggle(UI_Store.products[d.id].desc.length&gt;0)
}else{f.show()
}a.deselectEditor()
}if(d.desc||d.id==&quot;&quot;){b()
}else{editorController.disable(true);
e.prod.desc.html(&quot;&lt;img src=&apos;/assets/loadingAnimation.gif&apos;&gt;&quot;);
UI_Store.getProduct(d.id,function(){editorController.disable(false);
b();
a.updateCptSize()
})
}this._setProdName(d.name);
this._setProdMax(d.max);
this.tmp_img=d.img;
this.tmp_opts=d.opts.slice();
this.tmp_stocks=jQuery.extend({},d.stocks);
this.tmp_cat=d.category_ids.removeAll(0);
this._setProdPrice(d,(d.options&amp;&amp;d.options.find(function(f){return $.fn.hash_to_a(f).find_index(function(g){return f[g][&quot;p&quot;]&gt;0
})!=null
})));
this._setProdStrike(d.strike);
this._setProdVisi(d.visible);
this._setProdOpt(d);
this._setProdHiddenData(d);
this._setProdAddToCart(d);
this._setProdCat(d.category_ids);
if(v.mode==&quot;editor&quot;){this._setProdCustomPriceEditor(d)
}e.prod.main.addClass(&quot;uis_prod_&quot;+d.id+&quot; &quot;+d.category_ids.map(function(f){return&quot;uis_cat_&quot;+f
}).join(&quot; &quot;));
$(&quot;.uis_more_stock_sentence_div&quot;,this.cpt.node).hide();
if(d.stock_mode){$(&quot;.uis_more_stock_sentence_div&quot;,this.cpt.node).show()
}var c=this.custom_stock_sentence(d);
$(&quot;.uis_final_stock_sentence&quot;,this.cpt.node).html(c[0]);
$(&quot;.uis_final_stock_sentence&quot;,this.cpt.node).removeClass(&quot;hight uisa_s low&quot;).addClass(c[1]);
if(v.mode==&quot;editor&quot;){$(&quot;.uis_colors_wrapper&quot;,this.cpt.node).toggle(d.stock_mode);
$(&quot;.uis_more_prices&quot;,this.cpt.node).toggle(d.custom_prices);
$(&quot;.uis_prod_bloc_stock&quot;,this.cpt.node).removeClass(&quot;open&quot;);
$(&quot;.uis_more_prices_toggle&quot;,this.cpt.node).parent().removeClass(&quot;open&quot;);
if(d.stock_mode){$(&quot;.uis_prod_bloc_stock&quot;,this.cpt.node).addClass(&quot;open&quot;)
}if(d.custom_prices&amp;&amp;d.custom_prices.length){$(&quot;.uis_more_prices_toggle&quot;).parent().addClass(&quot;open&quot;)
}$(&quot;.uis_replenishment_date_input, .uis_pre_order_date_input, .uis_custom_stock_sentence_input&quot;).val(&quot;&quot;);
switch(d.stock_mode){case&quot;custom_sentence&quot;:$(&quot;.uis_custom_stock_sentence_input&quot;,this.cpt.node).val(d.custom_stock_sentence);
$(&quot;.uis_custom_stock_sentence_radiobutton&quot;,this.cpt.node).prop(&quot;checked&quot;,true).trigger(&quot;change&quot;);
break;
case&quot;replenishment&quot;:$(&quot;.uis_replenishment_date_radiobutton&quot;,this.cpt.node).prop(&quot;checked&quot;,true).trigger(&quot;change&quot;);
$(&quot;.uis_replenishment_date_input&quot;,this.cpt.node).data(&quot;DateTimePicker&quot;).date(moment.parseZone(d.replenishment_date));
break;
case&quot;pre_order&quot;:$(&quot;.uis_pre_order_date_radiobutton&quot;,this.cpt.node).prop(&quot;checked&quot;,true).trigger(&quot;change&quot;);
$(&quot;.uis_pre_order_date_input&quot;,this.cpt.node).data(&quot;DateTimePicker&quot;).date(moment.parseZone(d.pre_order_date));
break;
default:$(&quot;.uis_stock_radiobutton&quot;,this.cpt.node).prop(&quot;checked&quot;,true).trigger(&quot;change&quot;);
break
}d.tmp_color=null;
$(&quot;.uis_custom_stock_sentence_color.&quot;+d.custom_stock_sentence_color,this.cpt.node).click();
$(&quot;.uis_seo_description textarea&quot;,this.n.prod.main).val(d.seo_description);
this.n.prod.cat.addClass(&quot;admin_elem&quot;);
this.n.prod.hidden.addClass(&quot;admin_elem&quot;);
$(&quot;.uis_seo_description&quot;,this.n.prod.main).addClass(&quot;admin_elem&quot;);
$(&quot;.uis_colors_wrapper&quot;,a.cpt.node).toggle($(&quot;[name=stock_mode]:checked&quot;).val()!=&quot;default_sentence&quot;)
}else{$(&quot;.uis_prices,.uis_price_opts,.uis_shipping_infos_product,.uis_custom_prices&quot;,this.cpt.node).toggle(!c[2]);
$(&quot;.uis_seo_description&quot;,this.n.prod.main).remove()
}this.n.list.hide();
this.n.prod.main.show();
this.showCatList();
this.updateCptSize();
this._setImagesAndZoom(d);
this.n.prod.img.editable_node({type:&quot;image&quot;});
this.n.prod.desc.editable_node({type:&quot;text&quot;})
},_setImagesAndZoom:function(a){UI_Store.setImage(this.n.prod.img,a.img,null,true,this.n.prod.imgs);
UI_Store._setZoomProduct(this.n.prod.img.find(&quot;img&quot;),a.img[0])
},_setProdName:function(a){if(v.mode==&quot;editor&quot;){this.n.prod.name.find(&quot;input&quot;).val(a)
}else{this.n.prod.name.html(a)
}},_toggle_strike_price:function(a){if(a){this.n.prod.strike.show();
this.n.prod.main.find(&quot;.uis_strike_input&quot;).show()
}else{this.n.prod.main.find(&quot;.uis_set_strike_price&quot;).val(0).trigger(&quot;change&quot;);
this.n.prod.strike.hide();
this.n.prod.main.find(&quot;.uis_strike_input&quot;).hide()
}},_setProdCustomPriceEditor:function(d){var f=this.n.prod.main;
var a=this;
var c=&quot;&lt;select name=&apos;member_groups&apos;&gt;&lt;option value=&apos;any&apos;&gt;Any&lt;/option&gt;&quot;;
UI_Store.member_groups.each(function(g){c+=&quot;&lt;option value=&apos;&quot;+g.id+&quot;&apos;&gt;&quot;+$(&quot;&lt;div&gt;&quot;).text(g.name).html()+&quot;&lt;/option&gt;&quot;
});
c+=&quot;&lt;/select&gt;&quot;;
$(&quot;.uis_more_prices_toggle&quot;,f).off().click(function(){$(&quot;.uis_more_prices&quot;,f).slideToggle(300);
$(this).closest(&quot;.uis_prod_bloc&quot;).toggleClass(&quot;open&quot;)
});
var b=$(&quot;.uis_custom_prices_tbody&quot;,f).empty().off();
b.on($.change_events,&quot;.uis_input_number.percent&quot;,function(){$(this).closest(&quot;tr&quot;).find(&quot;.uis_input_number.amount&quot;).val(UI_Store.convert_without_vat(UI_Store.customPriceAmount(UI_Store.convert_with_vat(a.n.prod.price.find(&quot;input&quot;).val()),{type:&quot;percent&quot;,value:parseFloat($(this).val())})));
$(this).closest(&quot;tr&quot;).data(&quot;type&quot;,&quot;percent&quot;)
});
b.on($.change_events,&quot;.uis_input_number.amount&quot;,function(){$(this).closest(&quot;tr&quot;).find(&quot;.uis_input_number.percent&quot;).val(&quot;&quot;);
$(this).closest(&quot;tr&quot;).data(&quot;type&quot;,&quot;amount&quot;)
});
b.on(&quot;click&quot;,&quot;.uis_delete_custom_price&quot;,function(){$(this).closest(&quot;tr&quot;).remove()
});
if(d.custom_prices){cps=d.custom_prices.concat();
cps.sort(function(h,g){return h.quantity-g.quantity
});
cps.each(function(g){var h=$(&quot;&lt;tr class=&apos;one_custom_price&apos; data-type=&apos;&quot;+g.type+&quot;&apos;&gt;&lt;td&gt;&lt;input min=&apos;1&apos; class=&apos;uis_input_number quantity site_textbox &apos; type=&apos;number&apos; value=&apos;&quot;+g.quantity+&quot;&apos;/&gt;&lt;/td&gt;&lt;td&gt;&quot;+c+&quot;&lt;/td&gt;&lt;td&gt;&lt;input min=&apos;0.01&apos; class=&apos;uis_input_number percent site_textbox&apos; type=&apos;number&apos; value=&apos;&quot;+g.value+&quot;&apos; step=0.01 /&gt;%&lt;/td&gt;&lt;td&gt;&lt;input min=&apos;0.01&apos; class=&apos;uis_input_number amount site_textbox&apos; type=&apos;number&apos; value=&apos;&quot;+UI_Store.convert_without_vat(g.value)+&quot;&apos;step=0.01 /&gt;  &quot;+UI_Store.show_price(null,true)+&quot;&lt;/td&gt;&lt;td&gt;&lt;div class=&apos;fonticon uis_delete_custom_price&apos;&gt;&quot;+$.fn.fonticon(&quot;close&quot;)+&quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&quot;).appendTo(&quot;.uis_custom_prices_tbody&quot;);
h.find(&quot;select&quot;).val(g.group_id);
$(&quot;.uis_input_number.&quot;+g.type,h).change()
})
}$(&quot;.uis_add_custom_price&quot;,f).off().click(function(i){var g=$(&quot;tr:last&quot;,b);
if(g.length==0){g=null
}var h=$(&quot;&lt;tr class=&apos;one_custom_price&apos; data-type=&apos;&quot;+(g?g.data(&quot;type&quot;):&quot;amount&quot;)+&quot;&apos; &gt;&lt;td&gt;&lt;input min=&apos;1&apos; class=&apos;uis_input_number quantity site_textbox&apos; type=&apos;number&apos; value=&apos;&quot;+(g?parseInt($(&quot;.quantity&quot;,g).val())+1:2)+&quot;&apos;/&gt;&lt;/td&gt;&lt;td&gt;&quot;+c+&quot;&lt;/td&gt;&lt;td&gt;&lt;input min=&apos;0.01&apos; class=&apos;uis_input_number percent site_textbox&apos; type=&apos;number&apos; value=&apos;&quot;+(g?$(&quot;.percent&quot;,g).val():&quot;&quot;)+&quot;&apos; step=0.01 /&gt;%&lt;/td&gt;&lt;td&gt;&lt;input min=&apos;0.01&apos; class=&apos;uis_input_number amount site_textbox&apos; type=&apos;number&apos; value=&apos;&quot;+(g?$(&quot;.amount&quot;,g).val():UI_Store.convert_without_vat(d.price))+&quot;&apos; step=0.01 /&gt; &quot;+UI_Store.currency_sym()+&quot;&lt;/td&gt;&lt;td&gt;&lt;div class=&apos;fonticon uis_delete_custom_price&apos;&gt;&quot;+$.fn.fonticon(&quot;close&quot;)+&quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&quot;).appendTo(b);
h.find(&quot;select[name=member_groups]&quot;).val(g?$(&quot;select[name=member_groups]&quot;,g).val():&quot;any&quot;);
e()
});
var e=function(){$(&quot;.uis_custom_prices_tbody select[name=member_groups]&quot;,f).niceSelect();
$(&quot;.nice-select li&quot;,f).each(function(g){$(&quot;&lt;span&gt;&quot;).text($(this).text()).appendTo($(this).empty());
var h=$(this);
$(h).find(&quot;span&quot;).css(&quot;color&quot;,&quot;black&quot;);
UI_Store.member_groups.each(function(i){if(i.id==$(h).data(&quot;value&quot;)){$(h).find(&quot;span&quot;).css(&quot;color&quot;,i.color)
}})
});
$(&quot;select[name=member_groups]&quot;,f).change(function(j){var h=$(this).val();
var i=UI_Store.member_groups.find(function(k){return k.id==parseInt(h)
});
$(&quot;.nice-select&quot;,$(this).closest(&quot;td&quot;)).css(&quot;color&quot;,i?i.color:&quot;black&quot;)
}).change()
};
e()
},_setProdPrice:function(a,j,b){if(v.mode==&quot;editor&quot;){var c=a.price;
var i=this;
this.n.prod.price.empty().prepend(&apos;&lt;input class=&quot;uis_set_price live_edit site_textbox&quot; type=&quot;text&quot;&gt;&apos;+UI_Store.show_price(null,true)).find(&quot;input&quot;).restrictTo(&quot;price&quot;).val(UI_Store.convert_without_vat(c)).trigger(&quot;blur&quot;).trigger(&quot;change&quot;);
this.n.prod.price_strike_node.find(&quot;input[type=checkbox]&quot;).prop(&quot;checked&quot;,a.strike)
}else{var c=UI_Store.unitPrice(a,1,UI_Store.current_member);
var f=&quot;&quot;;
if(this.cpt.data.show_price_from&amp;&amp;b){f+=&quot;from &quot;
}if(j&amp;&amp;j!==true&amp;&amp;j&gt;0){f+=UI_Store.show_price(c+j);
this.n.prod.opt_price.html(sprintf(&quot;%s + %s for the options&quot;,UI_Store.show_price(c),UI_Store.show_price(j)))
}else{f+=UI_Store.show_price(c);
this.n.prod.opt_price.empty()
}this.n.prod.price.html(f);
if(a.custom_prices){var e=null;
var h=a.custom_prices.concat();
h.push({quantity:1,type:&quot;amount&quot;,value:a.price,group_id:&quot;any&quot;});
h=h.filter(function(l){var k=((e==null||l.quantity&lt;e.quantity)&amp;&amp;(l.group_id==&quot;any&quot;||(UI_Store.current_member&amp;&amp;UI_Store.current_member.group_ids.indexOf(parseInt(l.group_id))!=&quot;-1&quot;)));
if(k){e=l;
l.amount=UI_Store.customPriceAmount(a.price,l)
}return k
});
if(h.length&gt;1){h.sort(function(l,k){return l.quantity-k.quantity
});
var g=&quot;&quot;;
h.each_with_index(function(l,k){g+=&quot;&lt;tr&gt;&lt;td class=&apos;quantity&apos;&gt;&quot;+l.quantity+(h[k+1]?h[k+1][&quot;quantity&quot;]&gt;l.quantity+1?&quot;+&quot;:&quot;&quot;:&quot;+&quot;)+&quot;&lt;/td&gt;&lt;td&gt;&quot;+UI_Store.show_price(l.amount)+&quot;&lt;/td&gt;&lt;/tr&gt;&quot;
});
var d=&quot;&lt;div&gt;&lt;input type=number min=1 max=999 step=1 value=&apos;&quot;+h[1][&quot;quantity&quot;]+&quot;&apos; class=&apos;uis_qte_prod site_textbox&apos;&gt;&lt;span&gt;&quot;+UI_Store.btn({txt:&quot;&lt;span class=&apos;uis_bsa&apos;&gt;Add&lt;/span&gt;&quot;,&quot;class&quot;:&quot;site_button cta&quot;})+&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&apos;clear:both&apos;&gt;&lt;/div&gt;&quot;;
this.n.prod.custom_prices.html(&quot;&lt;span&gt;Volume discount&lt;/span&gt;&lt;table class=&apos;custom_prices_table_viewer&apos;&gt;&lt;tbody&gt;&quot;+g+&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;+d);
$(&quot;.uis_btn&quot;,this.n.prod.custom_prices).click(function(){var k=$(this).closest(&quot;.uis_prod&quot;);
$(&quot;.uis_qte_prod&quot;,k).val($(&quot;.uis_custom_prices .uis_qte_prod&quot;,k).val());
$(&quot;.uis_cart_wrapper .uis_btn&quot;,k).click()
})
}}else{this.n.prod.custom_prices.empty()
}}},_setProdStrike:function(a){if(v.mode==&quot;editor&quot;){$(&quot;.uis_strike_input&quot;,this.n.prod.main).html(&apos;&lt;input type=&quot;text&quot; class=&quot;uis_set_strike_price live_edit site_textbox&quot;&gt;&apos;+UI_Store.show_price(null,true)).find(&quot;input&quot;).restrictTo(&quot;price&quot;).val(UI_Store.convert_without_vat(a||0)).trigger(&quot;blur&quot;).trigger(&quot;change&quot;);
this._toggle_strike_price(a)
}else{if(a){this.n.prod.strike.html(&quot;&lt;span class=&apos;uis_strike_price&apos;&gt;&quot;+UI_Store.show_price(a)+&quot;&lt;/span&gt;&quot;).show()
}else{this.n.prod.strike.hide()
}}},_setProdMax:function(a){if(v.mode==&quot;editor&quot;&amp;&amp;this.n.prod.max&amp;&amp;typeof(a)==&quot;number&quot;){this.n.prod.max.val(a).trigger(&quot;blur&quot;).trigger(&quot;change&quot;)
}},_setProdVisi:function(a){if(v.mode==&quot;editor&quot;){this.n.prod.visi.find(&quot;input&quot;).prop(&quot;checked&quot;,a)
}},_setProdOpt:function(e){var b=this,f=(v.mode==&quot;editor&quot;)?this.tmp_opts:e.opts,a=true,g=this.n.prod.opt.find(&quot;&gt;div:last&quot;).empty();
this.n.prod.opt.hide();
if(f&amp;&amp;f.length&gt;0){var d=&quot;&lt;table&gt;&quot;;
for(var c=0;
c&lt;f.length;
c++){if(f[c]){d+=&quot;&lt;tr&gt;&lt;td&gt;&quot;+(!f[c][&quot;name&quot;].match(/^-h-\d+/)?f[c][&quot;name&quot;]:&quot;&quot;)+&quot;&lt;td&gt;&quot;
}if(f[c].options&amp;&amp;$.fn.hash_size(f[c].options)&gt;0){d+=UI_Store.option2select(f[c])
}else{d+=UI_Store.option2input(f[c],&quot;&quot;)
}a=false
}if(d.length&gt;0){g.html(d).find(&quot;select&quot;).change(function(){$(this).removeAttr(&quot;firstTime&quot;);
b._setProdAddToCart(e)
});
g.find(&quot;input, textarea&quot;).blur(function(){var h=$(this).removeAttr(&quot;firstTime&quot;),i=h.val().substr(0,f[&quot;&lt;&quot;]);
h.val(i)
});
this.n.prod.opt.show()
}}if(v.mode==&quot;editor&quot;){if(a){$(&quot;&lt;div&gt;No option defined&lt;/div&gt;&quot;).appendTo(g)
}$(&quot;&lt;div style=&apos;text-align:center;margin:10px 0;&apos; class=editor_interface&gt;&quot;).html($(&quot;&lt;span class=&apos;admin_elem ib edit_btn&apos;&gt;Edit&lt;/span&gt;&quot;).click(function(){tb_show(null,&quot;/store_options/options/?cptserver_id=&quot;+b.cpt.idserver+&quot;&amp;product=1&amp;alone=1&amp;width=1000&amp;height=500&amp;TB_iframe&quot;)
})).appendTo(g);
this.n.prod.opt.show()
}else{this.n.prod.desc.closest(&quot;.uis_desc_wrapper&quot;).find(&quot;&gt;b&quot;).hide()
}},_setProdHiddenData:function(b){var a=this;
if(v.mode==&quot;editor&quot;){this.n.prod.hidden.find(&quot;.uis_weight input&quot;).restrictTo(&quot;int&quot;).val(b.weight||0).trigger(&quot;blur&quot;).trigger(&quot;change&quot;);
this.n.prod.hidden.find(&quot;.uis_order input&quot;).val(b.order);
this.n.prod.hidden.find(&quot;.uis_private_notes textarea&quot;).val(b.private_notes||&quot;&quot;).on(&quot;focus blur&quot;,function(d){$(this).css({width:d.type==&quot;focus&quot;?&quot;20em&quot;:&quot;10em&quot;}).attr(&quot;rows&quot;,d.type==&quot;focus&quot;?&quot;3&quot;:&quot;1&quot;)
}).blur();
this.n.prod.hidden.find(&quot;.uis_ref input&quot;).val(b.reference||&quot;&quot;).on(&quot;focus blur&quot;,function(d){$(this).css({width:d.type==&quot;focus&quot;?&quot;20em&quot;:&quot;5em&quot;})
}).blur();
this.n.prod.hidden.find(&quot;.uis_vat_rate&quot;).toggle(UI_Store.conf.billing.enabled&amp;&amp;false).find(&quot;input&quot;).val(b.vat_rate||(UI_Store.conf.billing.enabled?UI_Store.conf.billing.vat_rate:&quot;&quot;));
a.attachments_tmp=b.attachments||[];
var c=this.n.prod.digital;
$(&quot;.uis_set_attachments&quot;,a.n.prod.hidden).toggle(b.digital);
$(&quot;input&quot;,c).prop(&quot;checked&quot;,b.digital).off().on(&quot;change&quot;,function(){if(this.checked){$(&quot;.uis_set_attachments&quot;,a.n.prod.hidden).click()
}$(&quot;.uis_set_attachments&quot;,a.n.prod.hidden).toggle(this.checked)
});
$(&quot;.uis_set_attachments&quot;,a.n.prod.hidden).off().click(function(d){if(!b.id){statusController.message(&quot;Save this product to configure digital content.&quot;,&quot;warning&quot;)
}else{tb_show(null,&quot;/cpt_store/set_digital_attachments/?cptserver_id=&quot;+a.cpt.idserver+&quot;&amp;product_id=&quot;+b.id+&quot;&amp;alone=1&amp;width=1000&amp;height=700&amp;TB_iframe&quot;)
}})
}},_getOptMax:function(e){var d=this.n.prod.opt.find(&quot;&gt;div:last&quot;).find(&quot;option:selected&quot;).collect(function(f){return $(f).attr(&quot;data-managed&quot;)?$(f).val().html_encode():&quot;|&quot;
});
var c=e.stocks[JSON_.stringify(d)],b=-1,a=d.slice();
while(c==undefined&amp;&amp;b++&lt;a.length){d=a.slice();
d[b]=&quot;|&quot;;
c=e.stocks[JSON_.stringify(d)]
}return c
},_getMaxStock:function(p){var has_null_stock=false;
var s=$.map(p.stocks,function(v,k){if(v===null){has_null_stock=true
}return v
});
if(s.length==0){return p.max
}else{var ks=[];
if(this.prodSelected){try{eval(&quot;ks=&quot;+this.optionsVal())
}catch(e){dbg.error(&quot;ERROR during EVAL&quot;)
}var bsk=UI_Store.extractBonusAndStockKey(p,ks)
}else{var bsk=false
}if(bsk&amp;&amp;p.stocks[bsk[1]]){return parseInt(p.stocks[bsk[1]])
}else{if(has_null_stock||p.opts.find(function(opt){return opt.options&amp;&amp;$.map(opt.options,function(v,k){return v
}).find(function(o){return !o.s
})
})){s.push(p.max)
}return Math.max.apply(Math,s)
}}},saveOptAndStock:function(a,b){this.tmp_opts=[].concat(a);
this.tmp_stocks=jQuery.extend({},b);
this._setProdOpt(this.cpt);
tb_remove()
},optionsVal:function(){var b=this.n.prod.opt.find(&quot;select, input, textarea&quot;).collect(function(a){return[$(a).attr(&quot;name&quot;),$(&quot;&lt;div&gt;&quot;).text($(a).val()).html()]
});
return JSON_.stringify(b)
},_setProdAddToCart:function(p){if(this.n.cart&amp;&amp;this.n.cart.add){var self=this;
var c=[],a=UI_Store.cart.items[p.id],n=this.n.cart.prod.hide(),t=[];
for(var i in a){try{eval(&quot;c=&quot;+i);
t.push(&quot;&lt;b&gt;&quot;+a[i]+&quot; &quot;+(a[i]&gt;1?&quot;items&quot;:&quot;item&quot;)+&quot;&lt;/b&gt; &lt;i&gt;&quot;+UI_Store.options2html(c)+&quot;&lt;/i&gt;&quot;)
}catch(e){}}if(t.length&gt;0){n.show().find(&quot;div:last&quot;).html(t.join(&quot;&lt;br&gt;&quot;))
}var custom_stock_sentence_array=this.custom_stock_sentence(p);
$(&quot;.uis_final_stock_sentence&quot;,this.cpt.node).html(custom_stock_sentence_array[0]);
$(&quot;.uis_final_stock_sentence&quot;,this.cpt.node).removeClass(&quot;hight uisa_s low&quot;).addClass(custom_stock_sentence_array[1]);
this.n.cart.add.toggle(!custom_stock_sentence_array[2]);
this.n.cart.add.find(&quot;input&quot;).val(1);
var max=this._getMaxStock(p);
this.n.cart.add.find(&quot;.uis_cart_quantity&quot;).toggle(max!=1);
this.n.cart.add.find(&quot;.uis_bsa&quot;).text(p.stock_mode==&quot;pre_order&quot;?&quot;Pre-order&quot;:(max==1?&quot;Buy&quot;:&quot;Add&quot;));
setTimeout(function(){var ks=[];
try{eval(&quot;ks=&quot;+self.optionsVal())
}catch(e){dbg.error(&quot;ERROR during EVAL&quot;)
}var bsk=UI_Store.extractBonusAndStockKey(self.prodSelected,ks);
var p_options=p.opts.find_all(function(opt){for(var i in opt.options){if(parseFloat(opt.options[i].p)&gt;0){return true
}}}).map(function(o){return o.name
});
var s_options=JSON_.parse(self.optionsVal()).map(function(o){if(o[1]!=&quot;uis_no_select&quot;){return o[0]
}});
self._setProdPrice(p,bsk[0]/100,p_options.find(function(o){return s_options.indexOf(o)==-1
}))
})
}},_setProdCat:function(h){if(h==null){h=this.tmp_cat||[]
}var e=this;
if(v.mode==&quot;editor&quot;){this.n.prod.cat_select.hide();
var g=0;
for(var f in UI_Store.categories){g++
}if(g&gt;1){this.n.prod.cat_add.show();
this.n.prod.cat_none.hide();
var d=&quot;&quot;;
var c=UI_Store.catjoin(function(){var a=&quot;&lt;li data-cat_id=&quot;+this.id+&quot; class=&apos;uis_ed site_categ&apos;&gt;&quot;+this.name;
if(!this.id||!h.include(this.id)){if(this.id){d+=a
}return&quot;&quot;
}return a
});
this.n.prod.clist.show().html(c.length&gt;0?c:&quot;&lt;i&gt;No category selected&lt;/i&quot;);
this.n.prod.cat_select.html(d.length&gt;0?d:&quot;&lt;li&gt;&lt;i&gt;All the categories are already selected [Close]&lt;/i&gt;&quot;)
}else{this.n.prod.clist.hide();
this.n.prod.cat_add.hide();
this.n.prod.cat_none.show()
}}else{var c=UI_Store.catjoin(function(){if(!this.id||!h.include(this.id)||!UI_Store.categories[this.id].stores.include(e.cpt.idserver)){return&quot;&quot;
}return&quot;&lt;li data-cat_id=&quot;+this.id+&quot; class=&apos;site_categ&apos;&gt;&quot;+this.name
});
if(c.length&gt;0){this.n.prod.cat.show();
this.n.prod.clist.html(c)
}else{this.n.prod.cat.hide()
}}},scroll:function(){if(this.cpt.data.auto_scroll&amp;&amp;!this.n.main.isTopIntoView()){this.n.main.scrollIntoView(true)
}},_setUrl:function(){if(this.cpt.page.cptUrl){if(this.cpt.data.auto_scroll&amp;&amp;!this.n.main.isTopIntoView()){this.n.main.scrollIntoView(true)
}var a=this.cpt.page.cptUrl.match(/s(\d+)([pcbs])(.*)?\/(.*)/);
if(a){var c=parseInt(a[1]);
var b=this;
if(a[2]==&quot;p&quot;){var d={};
if(a[3]){a[3].split(/([n]\d+)|([af][pac])/).find_all(function(e){return e&amp;&amp;e.length&gt;=2
}).map(function(e){return[e.charAt(0),e.slice(1)]
}).each(function(e){d[e[0]]=(e[0]==&quot;n&quot;)?parseInt(e[1]):e[1]
})
}else{d=null
}if(UI_Store.products[c]){return this.selectProd(c,d)
}else{return UI_Store.getProducts([c]).done(function(){b.selectProd(c,d)
}).fail(function(){b.selectCat(null,true)
})
}}else{if(a[2]==&quot;b&quot;){if(a[1]==1){return this.showCart(&quot;m&quot;)
}else{return this.showCart()
}}else{if(a[2]==&quot;s&quot;){return this.selectSearch(decodeURI(a[4]),parseInt(a[3]))
}else{return this.selectCat(c,this.prodSelected!=null,null,a[3])
}}}}}if((a&amp;&amp;a[0]==&quot;s&quot;)||!this.cpt.page.cptUrl){this.selectCat(null,true)
}},createCartHeader:function(){if(!this.n.cart){this.n.cart={}
}else{if(v.mode!=&quot;editor&quot;&amp;&amp;this.n.cart.main.find(&quot;div&quot;).length&gt;0){return
}}var b=this;
this.n.cart.main.generateComponentCart({});
if($.fn.hash_size(UI_Store.conf.methods)&gt;0){this.n.cart.items=this.n.cart.main.find(&quot;.uis_ttl&quot;);
this.n.cart.price=this.n.cart.main.find(&quot;.uis_pr&quot;);
this.n.cart.articles=this.n.cart.main.find(&quot;.uis_cextend&quot;);
this.n.cart.main.find(&quot;.uis_cresume, .uis_headf, .uis_exbtn&quot;).click(function(){b.showCart()
});
if(v.mode!=&quot;editor&quot;){var c=this.n.prod.main.find(&quot;.uis_td_attr&quot;);
this.n.cart.add=$(&quot;&lt;div class=&apos;uis_addcart&apos;&gt;&lt;div class=&apos;uis_cart_wrapper&apos;&gt;&lt;span class=uis_cart_quantity&gt;Quantity:&lt;input type=text class=&apos;uis_qte_prod site_textbox&apos;&gt;&lt;/span&gt;&lt;div&gt;&quot;+UI_Store.btn({txt:&quot;&lt;span class=&apos;uis_bsa&apos;&gt;Add&lt;/span&gt;&quot;,&quot;class&quot;:&quot;site_button cta&quot;})+&quot;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&quot;).insertAfter(this.n.prod.shipping_infos);
this.n.cart.prod=$(&quot;&lt;div class=uis_prodcart&gt;&lt;small&gt;Items already in your shopping cart: &lt;div&gt;&lt;/div&gt;&lt;/small&gt;&lt;/div&gt;&quot;).insertAfter(this.n.cart.add);
this.n.cart.add.find(&quot;.uis_btn&quot;).click(function(){if(UI_Store.checkCartOptions(b.n.prod.opt,b.prodSelected.opts,true)){UI_Store.updateItem(b.prodSelected,b.n.cart.add.find(&quot;input&quot;).val(),b.optionsVal()||&quot;&quot;);
b.addToCart(b.prodSelected)
}});
if(this.prodSelected){this._setProdGui(this.prodSelected)
}}else{this.n.cart.main.removeClass(&quot;admin_elem&quot;);
this.n.cart.main.find(&quot;.uis_headf_no&quot;).hide();
this.n.cart.main.find(&quot;.uis_hidden_data&quot;).hide()
}sigCtl.connect(&quot;UI_Store.updateCart&quot;,function(){b.next_show.done(function(){b.updateCart()
})
});
var a=1;
if(b.cpt.idserver){if(UI_Store.cart.items.price!=0&amp;&amp;$.cookie(&quot;uis_last_unpaid_orders&quot;)){a=b.cpt.ask({request:&quot;order_status&quot;,data:{orders:$.cookie(&quot;uis_last_unpaid_orders&quot;)}},function(d){if(d.paid){UI_Store.removeItems(true);
$.cookie(&quot;uis_last_unpaid_orders&quot;,null,{path:&quot;/&quot;})
}})
}else{$.cookie(&quot;uis_last_unpaid_orders&quot;,null,{path:&quot;/&quot;})
}}$.when(a).always(function(){UI_Store.updateCartHtml()
});
this.n.cart.main.show()
}else{if(this.n.cart){if(v.mode==&quot;editor&quot;){this.n.cart.main.addClass(&quot;admin_elem&quot;);
this.n.cart.main.find(&quot;.uis_headf_no&quot;).show().on(&quot;click&quot;,function(){propertyConverter.convertServer_manage(UI_Store.cpts[0],$(&quot;&lt;server_manage name=&apos;payment_conf&apos; url=&apos;/store_provider/all&apos; /&gt;&quot;)).defaultAction(blockSelector.selectedCpt())
});
this.n.cart.main.find(&quot;.uis_headf, .uis_cresume&quot;).hide()
}else{this.n.cart.main.hide()
}}}this.updateCptSize()
},buttonLoading:function(a,b){if(b!=false){$(a).hide().addClass(&quot;buttonLoading&quot;);
$(a).data(&quot;loading&quot;,$(&quot;&lt;img style=&apos;float: right;&apos; src=&apos;/assets/loadingAnimation.gif&apos;&gt;&quot;).appendTo($(a).parent()))
}else{$(a).data(&quot;loading&quot;).remove();
$(a).show().removeClass(&quot;buttonLoading&quot;)
}},updateCart:function(){if(this.n.cart){var a=this;
a.n.cart.main.desactivate();
setTimeout(function(){if(UI_Store.cart.num&gt;0){a.n.cart.main.activate()
}},500);
var c=UI_Store.cart.num;
this.n.cart.items.text(sprintf((c==1?&quot; (%1$s item)&quot;:&quot; (%1$s items)&quot;),c));
this.n.cart.price.html(&quot;&quot;+UI_Store.show_price(UI_Store.cart.price));
this.n.cart.articles.find(&quot;.uis_ul_w&quot;).html(UI_Store.cartHtmlProd.clone(true)).find(&quot;li&quot;).each(function(){$(this).on(&quot;click&quot;,function(){a.selectProd($(this).data(&quot;p&quot;).id);
return false
})
});
this.n.billc.html(UI_Store.ct.clone(true));
if(!this.payment_error){this.payment_error=location.pathname.match(/-PEN(\d+)$/);
if(this.payment_error){var b={&quot;4001&quot;:&quot;Transaction refused&quot;,&quot;4002&quot;:&quot;Not enough funds on this card&quot;,&quot;4003&quot;:&quot;Transaction refused&quot;,&quot;4004&quot;:&quot;Transaction abandoned&quot;,&quot;4005&quot;:&quot;Suspicion of fraud&quot;,&quot;4006&quot;:&quot;Card in opposition&quot;,&quot;4007&quot;:&quot;Card in opposition&quot;,&quot;4008&quot;:&quot;Authentication failed&quot;,&quot;4009&quot;:&quot;Authentication expired&quot;,&quot;4010&quot;:&quot;Invalid transaction&quot;,&quot;4011&quot;:&quot;Double transaction&quot;,&quot;4012&quot;:&quot;Incorrect card information&quot;,&quot;4013&quot;:&quot;Transaction refused&quot;};
$(&quot;.uis_payment_err&quot;,this.n.billc).show().html(&quot;Payment error: &quot;+(b[this.payment_error[1]]||this.payment_error[1])+&quot;&lt;br&gt;Please retry your payment&quot;)
}else{this.payment_error=-1
}}this.updateCptClass();
this.updateCptSize();
this.n.bill.find(&quot;.uis_order_follow&quot;).unbind(&quot;click&quot;).click(function(){UI_Store.removeItems(true);
a.selectList(a.catSelected,true);
a.hideCart();
tb_show(null,&quot;/cpt_member/member_space?site_id=&quot;+v.site_id+&quot;TB_iframe=true&amp;height=500&amp;width=1000&quot;)
});
this.n.bill.find(&quot;.uis_back_to_store&quot;).unbind(&quot;click&quot;).click(function(){UI_Store.removeItems(true);
a.selectList(a.catSelected,true);
a.hideCart()
});
this.n.bill.find(&quot;.uis_sb&quot;).unbind(&quot;click&quot;).click(function(){a.selectList(a.catSelected,true);
a.hideCart()
});
this.n.bill.off(&quot;click&quot;,&quot;.uis_sc&quot;).on(&quot;click&quot;,&quot;.uis_sc&quot;,function(){a.showCartPage(&quot;c&quot;);
return false
});
this.n.bill.find(&quot;.uis_sbp&quot;).unbind(&quot;click&quot;).click(function(){if(UI_Store.cart.num==0){return alert(&quot;Your shopping cart is empty.&quot;)
}if(!UI_Store.checkCartOptions($(&quot;.uis_options_table&quot;,a.n.billc),UI_Store.conf.options,true)){return alert(&quot;Please fill in your order options.&quot;)
}if($(&quot;.uis_terms_checkbox&quot;,a.n.bill).is(&quot;:not(:checked)&quot;)){return alert(&quot;You must accept the general terms of sales to move to the next step&quot;)
}a.updatePaymentFormHtml($(this).find(&quot;.uis_bsa&quot;).attr(&quot;method&quot;));
a.showCartPage(&quot;f&quot;);
a.n.bill.find(&quot;.uis_sbpm .uis_bsa&quot;).text(UI_Store.conf.summary_step||UI_Store.conf.methods[a.current_provider].integration==&quot;embed&quot;||UI_Store.shipping_step()?&quot;Next step &gt;&gt;&quot;:&quot;Pay to order &gt;&gt;&quot;);
a.n.bill.find(&quot;.uis_bill_breadcrumb [data-page=shipping]&quot;).toggle(UI_Store.shipping_step());
a.n.bill.find(&quot;.uis_bill_breadcrumb [data-page=summary]&quot;).toggle(!!UI_Store.conf.summary_step)
});
this.n.bill.find(&quot;.uis_sbpm&quot;).unbind(&quot;click&quot;).click(function(){var g=this;
var h=$(&quot;._ui18_member_signin:visible&quot;,a.n.bill).length&gt;0;
if(!a.testFormGdpr(a.n.bill)&amp;&amp;!h){if($(&quot;.buttonLoading&quot;).length){a.buttonLoading($(&quot;.buttonLoading&quot;),false)
}return false
}a.buttonLoading(g);
var f=a.n.bill.find(&quot;.uis_cerr&quot;).empty();
var d=a.n.bill.find(&quot;.uis_bft&quot;).find(&quot;input, textarea, select&quot;).removeClass(&quot;uis_pf_err&quot;);
var e={};
d.each(function(){var i=$(this);
e[i.attr(&quot;name&quot;)]=i.val()
});
e.name=e.member_name;
e.firstname=e.member_firstname;
UI_Store.order_in_progress=true;
a.cpt.ask({request:&quot;order&quot;,data:{normal_return_url:location.protocol+&quot;//&quot;+location.host+v.selectedPageFg.getUrl(false,&quot;/s1b/Congratulations&quot;),cancel_return_url:location.protocol+&quot;//&quot;+location.host+v.selectedPageFg.getUrl(false,&quot;/s0b/View-shopping-cart&quot;),cart:UI_Store.cart,user:e,signin:h,gdpr:a.getGdpr(a.n.gdpr)}},function(i){var l=new Date();
UI_Store.order_in_progress=false;
a.buttonLoading(g,false);
if($(&quot;.buttonLoading&quot;).length){a.buttonLoading($(&quot;.buttonLoading&quot;),false)
}if(i.success){if(h){a.updatePaymentFormHtml()
}else{if(i.country_changed){alert(sprintf(&quot;The delivery country (%1$s) does not match the country used to calculate shipping costs (%2$s).\nThe cart will be updated and you will be able to place the order with correct shipping costs.&quot;,i.new_country,i.previous_country));
a.showCartPage(&quot;c&quot;);
UI_Store.updateCartHtml()
}else{var j=function(q,m){if(e.m.substr(0,2)==&quot;cb&quot;||e.m==&quot;paypal&quot;){if((new Date()-l)&gt;10*60*1000){var n=a.cpt.ask({request:&quot;refresh_payment_form&quot;,order_reference:m})
}else{var n=i
}$.when(n).done(function(p){if(!p.success){p=i
}$(&quot;#form_cb_wrapper&quot;).remove();
try{a.n.bill.find(&quot;.uis_cb_form&quot;).html(UI_Store.cb_text&amp;&amp;UI_Store.cb_text.text?UI_Store.cb_text.text:&quot;&quot;).append($(&quot;&lt;div id=&apos;form_cb_wrapper&apos;&gt;&quot;).html(p.form))
}catch(r){console.error(&quot;Error integrating cb form&quot;,r)
}if(i.mode==&quot;submit&quot;){a.n.bill.find(&quot;.uis_cb_form form&quot;).submit();
a.buttonLoading(q)
}else{if(p.mode==&quot;show&quot;){a.showCartPage(&quot;cb&quot;);
if(p.title){$(&quot;.uis_bill_mn h2&quot;).text(p.title)
}}}$.cookie(&quot;uis_last_unpaid_orders&quot;,($.cookie(&quot;uis_last_unpaid_orders&quot;)||&quot;&quot;)+&quot;,&quot;+m,{expires:365,path:&quot;/&quot;})
})
}else{a.cpt.ask({request:&quot;confirm_order&quot;,order_reference:m},function(p){if(p.order_reference){$.cookie(&quot;uis_last_unpaid_orders&quot;,($.cookie(&quot;uis_last_unpaid_orders&quot;)||&quot;&quot;)+&quot;,&quot;+p.order_reference,{expires:365,path:&quot;/&quot;})
}});
a.showCart();
var o=a.showCartPage(&quot;m&quot;);
o.find(&quot;.uis_other_payment_method&quot;).toggle(Object.keys(UI_Store.conf.methods).length&gt;0)
}$.cookie(&quot;uis_last_payment_method&quot;,e.m,{expires:1,path:&quot;/&quot;})
};
var k=function(o,m,n){if(i.order_summary_html){$(&quot;.uis_summary_content&quot;).html(i.order_summary_html);
$(&quot;.uis_summary_content .uis_summary_use_shipping&quot;).toggle(UI_Store.use_shipping);
$(&quot;.uis_summary_content .uis_summary_product_img&quot;).each(function(){UI_Store.setImage($(this),UI_Store.products[$(this).data(&quot;product-id&quot;)].img,[110,null],true)
});
$(&quot;.uis_summary_pickup_point&quot;).toggle(!!n);
if(n){n.each_with_index(function(q,p){$(&quot;.uis_summary_pickup_point_address&quot;).append($(&quot;&lt;div&gt;&quot;).html($(&quot;[for*=uis_shipping_pickup_point_id_&quot;+q+&quot;_&quot;+UI_Store.cart.shipping_methods[p].id+&quot;]&quot;).html()))
})
}a.buttonLoading(o,false);
a.showCartPage(&quot;summary&quot;);
a.n.bill.find(&quot;.uis_pay .uis_bsa&quot;).text((UI_Store.conf.methods[a.current_provider].integration==&quot;embed&quot;)?&quot;Next step&quot;:&quot;Pay to order&quot;);
a.n.bill.find(&quot;.uis_pay&quot;).off(&quot;click&quot;).click(function(){j(this,m)
})
}else{j(o,m)
}};
if(i.shipping_step_html){a.n.bill.find(&quot;.uis_bill_shipping_form&quot;).html(i.shipping_step_html);
a.n.bill.find(&quot;.uis_save_shipping .uis_bsa&quot;).text((UI_Store.conf.summary_step||UI_Store.conf.methods[a.current_provider].integration==&quot;embed&quot;)?&quot;Next step &gt;&gt;&quot;:&quot;Pay to order &gt;&gt;&quot;);
a.showCartPage(&quot;shipping&quot;);
a.n.bill.find(&quot;.uis_save_shipping,.uis_choose_shipping&quot;).unbind(&quot;click&quot;).click(function(){var m=this;
a.buttonLoading(m);
setTimeout(function(){var n=[];
$(&quot;[name*=uis_shipping_pickup_point_id]:checked&quot;,a.n.bill).each(function(){n.push($(this).val())
});
a.cpt.ask({request:&quot;save_pickup&quot;,pickup_point_ids:n,order_reference:i.order_reference},function(o){a.buttonLoading(m,false);
k(m,o.order_reference,n)
},function(){a.buttonLoading(m,false);
k(m)
})
},0)
})
}else{k(g,i.order_reference)
}}}}},function(l){UI_Store.order_in_progress=false;
a.buttonLoading(g,false);
if($(&quot;.buttonLoading&quot;).length){a.buttonLoading($(&quot;.buttonLoading&quot;),false)
}var j=a.n.bill.find(&quot;.uis_bft&quot;).find(&quot;input, textarea, select&quot;).removeClass(&quot;uis_pf_err&quot;);
j.each(function(n,p){if(e[$(p).attr(&quot;name&quot;)]){$(p).val(e[$(p).attr(&quot;name&quot;)])
}});
var m=[];
for(var k in l){if(typeof(l[k])!=&quot;function&quot;){var o=j.filter(&quot;[name=&quot;+k+&quot;],[name=member_&quot;+k+&quot;],[name=&quot;+k.replace(&quot;member_&quot;,&quot;&quot;)+&quot;]&quot;,a.n.bill.find(&quot;.uis_bill_f&quot;));
if(o.length==0){m.push(l[k])
}else{o.addClass(&quot;uis_pf_err&quot;);
m.push((k.match(/^member_/)?&quot;&quot;:o.parents(&quot;tr:first&quot;).find(&quot;td:first&quot;).html().replace(/\*/,&quot;&quot;))+l[k])
}}}f.html(&quot;&lt;div style=&apos;padding:10px&apos;&gt;Please fix the errors below:&lt;div style=&apos;font-weight:normal&apos;&gt;&quot;+m.join(&quot;&lt;br&gt;&quot;)+&quot;&lt;/div&gt;&lt;/div&gt;&quot;);
a.updateCptSize()
})
})
}},updatePaymentFormHtml:function(d){d=d||this.current_provider;
this.current_provider=d;
var c=this.n.bill;
var b=UI_Store.conf.methods[d];
c.find(&quot;.uis_bfb&quot;).html(b.before);
c.find(&quot;.uis_bfa&quot;).html(b.after);
var f=c.find(&quot;.uis_bft&quot;).empty();
if(MemberController.isConnected()){f.append(&quot;&lt;tr class=_ui18_member_signup&gt;&lt;td&gt;Update my details&lt;/td&gt;&lt;td&gt;&lt;input type=checkbox name=member_update_data&gt; &lt;label&gt;Save as my default details&lt;/label&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=_ui18_member_signup&gt;&lt;td&gt;Name *&lt;/td&gt;&lt;td&gt;&lt;input type=hidden name=m value=&apos;&quot;+d+&quot;&apos;&gt;&lt;input type=hidden name=store_provider_id value=&apos;&quot;+b.id+&quot;&apos;&gt;&lt;input type=text name=member_name class=site_textbox&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=_ui18_member_signup&gt;&lt;td&gt;Firstname *&lt;/td&gt;&lt;td&gt;&lt;input type=text name=member_firstname class=site_textbox&gt;&lt;/td&gt;&lt;/tr&gt;&quot;);
$(&quot;.member_unconnected&quot;,c).hide();
var a=this;
var e=$(&quot;&lt;tr&gt;&lt;td colspan=2&gt;&lt;img src=&apos;/assets/loadingAnimation.gif&apos;&gt;&lt;/td&gt;&lt;/tr&gt;&quot;).prependTo(f);
this.cpt.ask({request:&quot;member_coordinates&quot;,data:{}},function(j){e.remove();
if(j.coordinates&amp;&amp;j.coordinates.length&gt;0){f.find(&quot;.uis_previous_coordinates_container&quot;).remove();
f.prepend(&quot;&lt;tr class=&apos;uis_previous_coordinates_container&apos;&gt;&lt;td colspan=2&gt;&lt;div style=&apos;font-size:20px;&apos;&gt;Previous personal details:&lt;/div&gt;&lt;div class=&apos;uis_previous_coordinates&apos;&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&quot;);
var i=f.find(&quot;.uis_previous_coordinates&quot;);
var g=[];
j.coordinates.each(function(n){var l=$(&quot;&lt;div&gt;&lt;/div&gt;&quot;).appendTo(i);
g.push(l);
$(&quot;&lt;div&gt;&quot;+n.html+&quot;&lt;/div&gt;&quot;).appendTo(l);
function k(){if(n.name){$(&quot;[name=member_name]&quot;,f).val(n.name)
}if(n.firstname){$(&quot;[name=member_firstname]&quot;,f).val(n.firstname)
}if(n.street){$(&quot;[name=street]&quot;,f).val(n.street)
}if(n.zip){$(&quot;[name=zip]&quot;,f).val(n.zip)
}if(n.city){$(&quot;[name=city]&quot;,f).val(n.city)
}if(n.country_id){$(&quot;[name=country_id]&quot;,f).val(n.country_id)
}if(n.company){$(&quot;[name=company]&quot;,f).val(n.company)
}if(n.phone){$(&quot;[name=phone]&quot;,f).val(n.phone)
}if(n.comment){$(&quot;[name=comment]&quot;,f).val(n.comment)
}}if(n.previous_coordinates){k()
}$(&quot;&lt;a href=# class=&apos;site_button uis_btn&apos;&gt;Modify this address&lt;/a&gt;&quot;).appendTo(l).click(function(){k();
return false
});
$(&quot;&lt;br&gt;&quot;).appendTo(l);
var m=&quot;Pay to order&quot;;
if(a.getGdprConfig().checkbox||UI_Store.conf.summary_step||UI_Store.conf.methods[a.current_provider].integration==&quot;embed&quot;||UI_Store.shipping_step()){m=&quot;Use this address&quot;
}$(&quot;&lt;div class=&apos;uis_btn site_button&apos;&gt;&lt;span class=&apos;uis_bsa&apos;&gt;&quot;+m+&quot;&lt;/span&gt;&lt;/div&gt;&quot;).appendTo(l).click(function(){k();
a.buttonLoading(this);
$(&quot;.uis_sbpm:visible&quot;).click()
})
});
var h=g.collect(function(k){return k.height()
}).max();
g.each(function(k){k.height(h)
});
a.updateCptSize()
}$(&quot;.uis_gdpr&quot;,a.node).removeClass(&quot;error&quot;).show()
},function(g){e.remove()
})
}else{f.append(&quot;&lt;tr class=_ui18_member_signin&gt;&lt;td&gt;Email *&lt;/td&gt;&lt;td&gt;&lt;input type=text class=site_textbox name=member_email autocomplete=&apos;email&apos;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=_ui18_member_signin&gt;&lt;td&gt;Password *&lt;/td&gt;&lt;td&gt;&lt;input type=password class=site_textbox name=member_password autocomplete=&apos;current-password&apos;&gt;&lt;br&gt;&lt;a href=# class=_ui18_do_forgot_password&gt;Forgotten password&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=_ui18_member_signup&gt;&lt;td&gt;Name *&lt;/td&gt;&lt;td&gt;&lt;input type=hidden name=m value=&apos;&quot;+d+&quot;&apos;&gt;&lt;input type=hidden name=store_provider_id value=&apos;&quot;+b.id+&quot;&apos;&gt;&lt;input type=text class=site_textbox name=member_name autocomplete=&apos;family-name&apos;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=_ui18_member_signup&gt;&lt;td&gt;Firstname *&lt;/td&gt;&lt;td&gt;&lt;input type=text class=site_textbox name=member_firstname autocomplete=&apos;given-name&apos;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=_ui18_member_signup&gt;&lt;td&gt;Email *&lt;/td&gt;&lt;td&gt;&lt;input class=site_textbox type=text name=member_email autocomplete=&apos;email&apos;&gt;&lt;/td&gt;&lt;/tr&gt;&quot;);
$(&quot;.member_unconnected&quot;,c).show();
MemberController.forgotPasswordButton(f);
sigCtl.getVariable(&quot;User.site_owner&quot;,function(i,l){if(l.owner&amp;&amp;l.logged){var j=$(&quot;[name=member_email]:last&quot;,f);
j.closest(&quot;tr&quot;).prependTo(j.closest(&quot;table&quot;));
var g=$(&quot;&lt;div class=uis_member_email_status&gt;&quot;).appendTo(j.parent());
g.text(&quot;Site owner detected: you can order on behalf of a member by typing his/her email address&quot;);
var k=null;
var h=null;
j.on($.change_events,function(){var m=this.value;
if(m!=h&amp;&amp;m.match(/\@.+\.../)){h=m;
if(k){k.abort()
}g.text(&quot;Member search in progress...&quot;);
k=$.ajax({simple_ajax:true,timeout:5000,url:&quot;https://www.sitew.com/json/member_signin_for_owner&quot;,dataType:&quot;jsonp&quot;,data:{site_id:v.site_id,member_email:m},success:function(n){g.text(n.status);
if(n.member){MemberController.signin(n.member)
}}})
}})
}})
}$(&quot;._ui18_member_signin&quot;,f).hide();
[[&quot;newsletter&quot;,&quot;Newsletter&quot;,&quot;checkbox&quot;,&quot;n&quot;,null,&quot;I accept to receive newsletters&quot;],[&quot;street&quot;,&quot;Address&quot;,&quot;textarea&quot;,&quot;a&quot;,&quot;street-address&quot;],[&quot;zip&quot;,&quot;Zip&quot;,&quot;text&quot;,&quot;a&quot;,&quot;postal-code&quot;],[&quot;city&quot;,&quot;City&quot;,&quot;text&quot;,&quot;a&quot;,&quot;address-level2&quot;],[&quot;country_id&quot;,&quot;Country&quot;,&quot;country_select&quot;,&quot;co&quot;,null],[&quot;phone&quot;,&quot;Phone&quot;,&quot;text&quot;,&quot;p&quot;,&quot;tel&quot;],[&quot;company&quot;,&quot;Company&quot;,&quot;text&quot;,&quot;s&quot;,&quot;company&quot;],[&quot;comment&quot;,&quot;Comment&quot;,&quot;textarea&quot;,&quot;c&quot;,null]].each(function(h){var k=b.data[h[3]];
if(k!=&quot;h&quot;){var j;
if(h[0]==&quot;newsletter&quot;&amp;&amp;MemberController.isConnected()&amp;&amp;MemberController.nlSubscriber()==&quot;true&quot;){return
}html=&quot;&lt;tr class=_ui18_member_signup&gt;&lt;td&gt;&quot;+h[1]+&quot; &quot;+((k==&quot;c&quot;&amp;&amp;h[2]!=&quot;checkbox&quot;)?&quot;*&quot;:&quot;&quot;)+&quot;&lt;/td&gt;&lt;td&gt;&quot;;
var g=([&quot;text&quot;,&quot;textarea&quot;].include(h[2])?&quot;site_textbox &quot;:&quot;&quot;)+(k==&quot;c&quot;?&quot;uis_req&quot;:&quot;&quot;);
var i=(h[4]?&quot; autocomplete=&apos;&quot;+h[4]+&quot;&apos;&quot;:&quot;&quot;);
switch(h[2]){case&quot;text&quot;:html+=&quot;&lt;input type=text name=&quot;+h[0]+&quot; class=&apos;&quot;+g+&quot;&apos;&quot;+i+&quot;&gt;&quot;;
break;
case&quot;textarea&quot;:html+=&quot;&lt;textarea name=&quot;+h[0]+&quot; class=&apos;&quot;+g+&quot;&apos;&quot;+i+&quot;&gt;&lt;/textarea&gt;&quot;;
break;
case&quot;country_select&quot;:html+=&quot;&lt;span class=&apos;select_style&apos;&gt;&lt;select id=country_select name=&quot;+h[0]+&quot; class=&apos;&quot;+g+&quot;&apos;&quot;+i+&quot;&gt;&lt;/select&gt;&lt;/span&gt;&quot;;
break;
case&quot;checkbox&quot;:html+=&quot;&lt;input id=&apos;&quot;+h[0]+&quot;&apos; type=&apos;checkbox&apos; name=&apos;&quot;+h[0]+&quot;&apos; class=&apos;&quot;+g+&quot;&apos; /&gt; &lt;label for=&apos;&quot;+h[0]+&quot;&apos;&gt;&quot;+h[5]+&quot;&lt;/label&gt;&quot;;
break
}html+=&quot;&lt;/td&gt;&lt;/tr&gt;&quot;;
f.append(html)
}});
$.get(&quot;/cpt_store/country_list&quot;,function(g){$(&quot;#country_select&quot;).replaceWith($(g).find(&quot;select&quot;).attr(&quot;name&quot;,&quot;country_id&quot;).attr(&quot;class&quot;,$(&quot;#country_select&quot;).attr(&quot;class&quot;)))
})
},showCart:function(b){if(this.cpt.id&amp;&amp;this.n.bill.is(&quot;:hidden&quot;)){this.n.catal.hide();
if(b==&quot;m&quot;){if($.fn.hash_size(UI_Store.conf)==0){var a=this;
return setTimeout(function(){a.showCart(b)
},100)
}UI_Store.removeItems(true);
this.n.bill.find(&quot;.uis_bfa&quot;).html(UI_Store.conf.methods[$.cookie(&quot;uis_last_payment_method&quot;)||&quot;paypal&quot;].after);
$.cookie(&quot;uis_last_payment_method&quot;,null,{path:&quot;/&quot;});
this.showCartPage(&quot;m&quot;).find(&quot;.uis_other_payment_method&quot;).hide();
this.cpt.page.setCptUrl(&quot;/s1b/Congratulations&quot;,&quot;Order successfully sent&quot;,this.cpt)
}else{this.showCartPage(&quot;c&quot;);
this.cpt.page.setCptUrl(&quot;/s0b/View-shopping-cart&quot;,&quot;View shopping cart&quot;,this.cpt);
v.scroll_to_component(this.component,{fast:true})
}this.n.bill.show();
this.updateCptSize()
}},hideCart:function(){if(this.cpt.id){this.n.catal.show();
this.n.bill.hide();
this.updateCptSize()
}},showCartPage:function(b){var a=this;
if(b==&quot;f&quot;){sigCtl.connect(&quot;Member.connection_state_changed&quot;,function(e,d){a.updatePaymentFormHtml()
},&quot;store_update&quot;)
}else{sigCtl.disconnect(&quot;Member.connection_state_changed&quot;,&quot;store_update&quot;)
}if(b==&quot;m&quot;){this.n.bill.find(&quot;.uis_order_follow&quot;).closest(&quot;.uis_btn&quot;).toggle(MemberController.isConnected())
}this.n.bill.find(&quot;.uis_bill_page&quot;).hide();
this.n.bill.find(&quot;.uis_bill_breadcrumb&quot;).toggle(b==&quot;summary&quot;||b==&quot;cb&quot;||b==&quot;shipping&quot;||b==&quot;f&quot;);
this.n.bill.find(&quot;.uis_bill_breadcrumb [data-page]&quot;).removeClass(&quot;uis_step_selected&quot;);
this.n.bill.find(&quot;.uis_bill_breadcrumb [data-page=&quot;+b+&quot;]&quot;).addClass(&quot;uis_step_selected&quot;);
var c=this.n.bill.find(&quot;.uis_bill_&quot;+b).show();
this.updateCptSize();
this.scroll();
return c
},onFontFamilyUpdate:function(){this.updateCptSize()
}};</script><style>.uis_warn,.uis_payment_err{color:#b00;background-color:#FFF;padding:5px;font-size:16px;font-weight:800;text-decoration:underline;text-align:center}
.uis_catalog,.uis_payment_err{display:none}
.uis_cat{clear:both;margin:20px 0}
.uis_cat li{display:inline;text-decoration:underline;cursor:pointer;margin:0 5px 0 0;padding:10px;border:1px solid #000;white-space:nowrap;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px}
.uis_cat li.uis_sel{border:2px solid #000;text-decoration:none;font-weight:800;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0}
.uis_prod_label{margin-bottom:5px;margin-top:20px;font-weight:700}
.uis_prod_label .edit_btn{font-weight:400}
.sitew_editor .selected .uis_prod_bloc{padding:5px;position:relative}
.sitew_editor .selected .uis_prod_bloc.open .uis_prod_bloc_toggle{transform:rotate(180deg)}
.uis_prod_bloc_toggle.admin_elem{position:absolute;right:5px;top:10px;font-size:18px;height:24px;width:24px;text-align:center;padding-top:4px;box-sizing:border-box;cursor:pointer}
.uis_page{display:none}
.uis_cmd_p{margin:10px;text-align:right}
.uis_sort{padding:10px 0;float:left;margin:9px 0 0}
.uis_sort span{text-decoration:underline;cursor:pointer}
.uis_sort_hidden{display:none}
.uis_ss{font-weight:900;padding-right:17px;background:transparent url(/stylesheets/components/UI_Store/ascw.gif) no-repeat center right}
.uis_ssa{background-image:url(/stylesheets/components/UI_Store/descw.gif)}
.uis_list{clear:both;margin:10px 0}
.uis_list ul{margin:10px 0;padding:0;clear:both}
.uis_cp_opts{clear:both}
.uis_pages{padding:10px 0;float:right}
.uis_pages li{display:inline;list-style:none;padding:1px 5px;margin:1px 5px;cursor:pointer}
.uis_pages li.selected{background-color:#EEE;cursor:default}
.uisl_m .uis_pages li{display:inline-block;text-align:center}
.uisl_m .uis_list_img img:not(.no_css){-webkit-user-select:none;-moz-user-select:none;user-select:none;height:auto;width:100%;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}
.uisl_m .uis_list_img img:not(.no_css).img_height{height:100%;width:auto}
.uisl_m .uis_list_img img.no_css{left:calc(50% - 33px);position:absolute;top:calc(50% - 33px)}
.uisl_s .uis_list&gt;ul li{float:left;cursor:pointer;margin:0 5px 5px 0;padding:10px;width:155px;height:200px;overflow:hidden;list-style:none}
.uisl_s .uis_list&gt;ul h3{font-size:12px;height:18px;overflow:hidden;text-align:center}
.uisl_s .uis_list&gt;ul h3 img{float:left}
.uisl_s .uis_list&gt;ul .uis_list_price{text-align:center}
.uisl_s .uis_list_img{width:150px;height:150px;text-align:center;display:table-cell;vertical-align:middle}
.uis_list_strike,.uis_strike_price{font-weight:700;text-decoration:line-through}
.uis_list_strike{color:#b00}
.uisl_m .uis_list_strike,.uisl_m .uis_strike_price{text-decoration:line-through;font-weight:400;color:rgba(255,255,255,.5)}
.uisl_h .uis_list_strike{display:block}
.uisl_l .uis_list&gt;ul li{float:left;cursor:pointer;margin:0 5px 5px 0;padding:10px;border:1px solid #000;width:249px;height:330px;overflow:hidden;list-style:none;border:none;background:0 0}
.uisl_l .uis_list&gt;ul h3{font-size:12px;height:42px;overflow:hidden;text-align:center}
.uisl_l .uis_list&gt;ul h3 img{float:left}
.uisl_l .uis_list&gt;ul .uis_list_price{text-align:center;font-weight:700}
.uisl_l .uis_list_img{width:250px;height:240px;text-align:center;display:table-cell;vertical-align:middle}
.uis_list ul{display:table;margin:10px 0;padding:0;width:100%}
.uisl_h .uis_list&gt;ul li{clear:both;cursor:pointer;overflow:hidden;list-style:none;padding:5px 0;position:relative;display:table;width:100%}
.uisl_h .uis_list&gt;ul li.uis_lio{background-color:#F7F7F7}
.uisl_h .uis_list&gt;ul h3,.uisl_h .uis_list&gt;ul .uis_list_img,.uisl_h .uis_list&gt;ul .uis_list_price{display:table-cell;vertical-align:middle}
.uisl_h .uis_list&gt;ul&gt;li&gt;span{display:table-cell;vertical-align:middle}
.uisl_h .uis_list&gt;ul h3{font-size:14px;padding-left:5px;text-align:left;width:100%}
.uisl_h .uis_list&gt;ul h3 span:first-child{font-size:16px;font-weight:700;padding-bottom:3px;display:inline-block}
.uisl_h .uis_list&gt;ul .uis_list_price{padding:0 5px;text-align:right;font-size:14px}
.uisl_h .uis_list_img{padding:5px 0;text-align:center;display:table-cell;vertical-align:middle;height:120px}
.uisl_h .uis_list_img&gt;div{width:160px}
.uisl_h .uis_list_img&gt;div&gt;img{width:100%;height:auto}
.uisl_m .uis_ar{font-weight:700}
.select_style{position:relative}
.select_style select{background-color:#fff;border:1px solid rgba(125,125,125,.2);border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.075) inset;color:#565656;position:relative;padding:5px}
.select_style select::before{border-left:5px outset rgba(0,0,0,0);border-right:5px outset rgba(0,0,0,0);border-top:5px solid #333;content:&quot;&quot;;pointer-events:none;position:absolute;right:11px;top:12px;z-index:1}
.uis_list_img{height:220px;width:300px}
.uisl_m .uis_list_img{height:305px;width:100%}
.uisl_h .uis_list_img{width:auto}
.uisa_l{color:#e87035;font-weight:600}
.uisa_a{color:#69c91a}
.uisa_s{color:#b00}
.ov_prod{display:none}
.uisl_m .uis_list&gt;ul li{margin:3px!important;min-height:380px;position:relative;display:inline-block;vertical-align:middle;list-style:none;cursor:pointer;text-align:center}
.uisl_m .uis_list&gt;ul li h3{min-height:24px;padding-top:10px}
.uisl_m .uis_list&gt;ul li .uis_list_img{text-align:center;position:relative;background-color:#fff;display:table;font-size:0}
.uisl_m .uis_list&gt;ul li .uis_list_img&gt;div{display:table-cell;vertical-align:middle;height:305px}
.uisl_m .uis_list&gt;ul li .uis_list_price{font-size:18px;font-weight:700;color:#B00}
.uisl_m .uis_list&gt;ul li .ov_prod{background-color:rgba(255,255,255,.8);height:60px;left:0;position:absolute;right:0;top:calc(305px - 60px);z-index:10;display:block;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear;opacity:0;pointer-events:none}
.uisl_m .uis_list&gt;ul li .ov_prod&gt;div{color:#333;padding-top:8px}
.uisl_m .uis_list&gt;ul li .ov_prod&gt;div&gt;div{display:inline-block}
.uisl_m .uis_list&gt;ul li .ov_prod&gt;div .fonticon{font-size:39px;cursor:pointer}
.uisl_m .uis_list&gt;ul li .ov_prod&gt;div .ov_text{font-size:18px;padding-left:10px;position:relative;top:-7px}
.uisl_m .uis_list&gt;ul li:hover .ov_prod,.uisl_m .uis_list&gt;ul li.added .ov_prod{opacity:1;pointer-events:auto}
.uisl_h .uis_list&gt;ul li .ov_prod{display:table-cell;vertical-align:middle;text-align:center;padding:0 8px}
.uisl_h .uis_list&gt;ul li .ov_prod&gt;div{background-color:#fff;font-size:16px;color:#333;box-shadow:0 0 2px rgba(0,0,0,.1),2px 2px 2px 0 rgba(0,0,0,.15);border-radius:2px;padding:5px;cursor:pointer}
.uisl_h .uis_list&gt;ul li .ov_prod&gt;div .fonticon{cursor:pointer}
.uis_list&gt;ul li .uis_ps{margin-right:3px}
.uis_sf .uisl_m .uis_list&gt;ul li{width:calc(100% - 6px)}
.uis_s0 .uisl_m .uis_list&gt;ul li{width:calc(50% - 6px)}
.uis_s1 .uisl_m .uis_list&gt;ul li{width:calc(33% - 6px)}
.uis_s2 .uisl_m .uis_list&gt;ul li{width:calc(25% - 6px)}
.UI_Store .uis_search{width:350px;float:left}
.uis_search .ui_search_suggest{max-width:65%}
.uis_prod_responsive .uis_prod .uis_td_imgs,.uis_prod_responsive .uis_prod .uis_td_attr{display:block}
.uis_prod_responsive .uis_search{float:none;width:calc(100% - 8px)}
.uis_prod_responsive .uis_cart{float:none}
.uis_prod_responsive .uis_cextend::after{display:none}
.uis_prod_responsive .uis_cextend{border-right:0 none;box-shadow:none;left:0;padding:5px}
.uis_prod_responsive .uisl_l .uis_list&gt;ul li{height:auto;margin-right:0;width:calc(100% - 20px);padding:0}
.uis_prod_responsive .uisl_l .uis_list_img{display:block;height:auto;width:100%}
.uis_prod_responsive .uisl_s .uis_list&gt;ul li{float:none;height:auto;width:calc(100% - 14px);margin:5px 0;padding:0}
.uis_prod_responsive .uisl_s .uis_list_img{display:block;height:auto;text-align:center;width:100%}
.uis_prod_responsive .main_cart&gt;thead td:last-child,.uis_prod_responsive .main_cart&gt;tbody td:last-child,.uis_prod_responsive .main_cart&gt;tfoot td.uis_option_price,.uis_prod_responsive .uis_ship+td{display:none}
.uis_prod_responsive .uis_bill .main_cart tbody td{padding:5px 10px}
.uis_prod_responsive .uis_cp_qte{text-align:center}
.uis_prod_responsive td.uis_extra.uis_total_label{text-align:right}
.uis_prod_responsive .uis_bi,.uis_prod_responsive .uis_br{float:none}
.uis_prod_responsive .uis_br{margin-bottom:5px}
.uis_prod_responsive .uis_c_rem{display:none;margin:0;padding:0}
.uis_prod_responsive .uis_name{max-width:700px}
.uis_prod_responsive .uis_cart_wrapper{position:relative;top:auto;margin-top:10px;right:0;width:100%}
.uis_prod_responsive .uis_bill .uis_coup_f{margin:auto}
.uis_prod_responsive .uisl_h .uis_list&gt;ul h3,.uis_prod_responsive .uisl_h .uis_list&gt;ul .uis_list_price,.uis_prod_responsive .uisl_h .uis_list&gt;ul&gt;li&gt;span{display:block;text-align:left;padding-left:5px}
.uis_prod_responsive .uisl_h .uis_list&gt;ul .uis_list_img{width:160px}
.uis_prod_responsive .uisl_h .uis_list&gt;ul h3{padding-top:5px}
.uis_prod_responsive .uis_list&gt;ul li .ov_prod{display:flex}
.ov_added{pointer-events:none;background-color:#69c91a;bottom:0;height:50px;left:0;position:absolute;right:0;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .34s ease-in-out;-moz-transition:opacity .34s ease-in-out;-o-transition:opacity .34s ease-in-out;transition:opacity .34s ease-in-out}
.ov_added::after{content:&quot;\2714&quot;;color:#fff;font-family:Icon,sans-serif;font-size:40px;left:0;position:absolute;right:0;text-align:center;top:8px;filter:alpha(Opacity=0);opacity:0;-webkit-transition:-webkit-transform .34s ease-in-out,opacity .34s ease-in-out;-webkit-transition-delay:.1s,.1s;-moz-transition:-moz-transform .34s ease-in-out .1s,opacity .34s ease-in-out .1s;-o-transition:-o-transform .34s ease-in-out .1s,opacity .34s ease-in-out .1s;transition:transform .34s ease-in-out .1s,opacity .34s ease-in-out .1s;transform:translateY(15px);-webkit-transform:translateY(15px)}
.added .ov_added{filter:alpha(Opacity=100);opacity:1}
.added .ov_added::after{transform:translateY(0px);-webkit-transform:translateY(0px);filter:alpha(Opacity=100);opacity:1}
.uis_price{color:#B00;font-weight:700}
.uis_price,.uis_prod_cat{margin-bottom:5px}
.uis_strike{display:none}
.uis_prices .uis_strike{color:#777}
.uisl_m .main_cart,.uis_sum_grid{border-collapse:collapse;border-spacing:0;-webkit-box-shadow:0 5px 12px 0 rgba(0,0,0,.2),0 4px 14px 0 rgba(0,0,0,.19);-moz-box-shadow:0 5px 12px 0 rgba(0,0,0,.2),0 4px 14px 0 rgba(0,0,0,.19);box-shadow:0 5px 12px 0 rgba(0,0,0,.2),0 4px 14px 0 rgba(0,0,0,.19);margin:0 auto;width:calc(100% - 40px)}
.uisl_m .main_cart thead td,.uisl_m .main_cart tfoot td,.uis_sum_grid thead td,.uis_sum_grid tfoot td{font-size:16px;font-weight:700;padding:15px 5px}
.uisl_m .main_cart .uis_ar,.uis_sum_grid .uis_ar{text-align:center}
.uisl_m .main_cart tfoot td.uis_extra,.uis_sum_grid tfoot td.uis_extra{padding:0 10px}
.uisl_m .main_cart .uis_c_thead,.uis_sum_grid .uis_c_thead{font-weight:700;padding:10px 15px}
.uisl_m .main_cart tbody tr td,.uis_sum_grid tbody tr td{-webkit-transition:background-color .25s ease;-moz-transition:background-color .25s ease;-o-transition:background-color .25s ease;transition:background-color .25s ease}
.uisl_m .main_cart .uis_cp_qte,.uis_sum_grid .uis_cp_qte{text-align:center}
.uisl_m .main_cart .uis_cp_opts,.uis_sum_grid .uis_cp_opts{clear:none}
.uis_bill .main_cart tbody td{padding:10px 15px;cursor:default}
#body .component .uisl_m .uis_list&gt;ul li.editor_add_item{box-sizing:border-box;height:380px}
#body .component .uisl_s .uis_list&gt;ul li.editor_add_item{height:195px;width:150px}
#body .component .uis_list ul.uisl_l&gt;li.editor_add_item{height:314px;width:242px}
#body .component .uisl_h .uis_list&gt;ul li.editor_add_item{min-height:auto;padding-top:25px}
#body .component .uisl_h .uis_list&gt;ul li.editor_add_item&gt;div{display:inline-block;height:57px}
.uis_tmpl_helper{display:block;position:absolute;top:-10000px}
.uis_prod{display:none}
.uis_td_imgs{width:350px;text-align:center;vertical-align:top}
.uis_td_imgs .uis_img{min-height:250px}
.uis_td_imgs .uis_imgs{cursor:pointer}
.uis_td_imgs div{position:relative}
.uis_name{margin:0 0 10px;font-size:34px;max-width:calc(100% - 145px)}
.uis_prod_cat{max-width:calc(100% - 145px)}
.uis_cart_wrapper{position:absolute;top:10px;right:10px;width:160px;text-align:center}
.uis_cart_wrapper .uis_btn{margin-top:15px}
.uis_addcart input.uis_qte_prod:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]){display:inline-block;width:30px;text-align:center;margin-left:5px;float:none}
#body .uis_cat_list{display:inline-block;padding:5px 5px 5px 0}
#body .uis_cat_list li{display:inline-block;padding-right:15px;cursor:pointer;list-style:none;margin:0 5px 5px;padding:2px}
#body .uis_cat_list li.uis_ed{padding:2px 15px 3px 5px;position:relative}
#body .uis_cat_list li.uis_ed:after{content:&quot;\6dd8&quot;;position:absolute;font-family:icon;right:3px;top:6px;font-size:10px;color:#000}
#body .uis_addCat_wrapper{display:inline-block;margin-left:8px;position:relative;overflow:visible;z-index:50}
#body .uis_addCat_wrapper ul{left:0;position:absolute;top:30px;max-height:200px;padding:3px;overflow-y:auto;overflow-x:hidden;width:100%}
#body .uis_addCat_wrapper ul::after{content:&quot;&quot;;position:absolute;bottom:calc(100% - 3px);left:0;width:22px;height:20px;z-index:-1}
#body .uis_addCat_wrapper li{cursor:pointer;list-style:none;padding:3px 5px;position:relative;width:100%}
#body .uis_addCat_wrapper li.uis_ed{padding:3px 5px 3px 24px;margin-bottom:3px;font-weight:400}
#body .uis_addCat_wrapper li.uis_ed::after{content:&quot;\271a&quot;;position:absolute;font-family:icon;left:8px;top:7px;font-size:10px}
.uis_img_ed,.uis_desc_ed{cursor:pointer}
.uis_imgs{height:50px;width:180px;text-align:center;display:table-row}
.uis_imgs&gt;div{display:table-cell;vertical-align:middle}
.uis_td_attr{vertical-align:top;padding-left:5px;position:relative}
.uis_visi{margin:10px 0}
.uis_visi{position:absolute;top:0;right:10px}
.uis_price,.uis_strike_price,.uis_stock{font-size:20px}
.uis_stock{transition:color .15s linear}
.uis_stock.admin_elem{font-size:inherit;margin:0}
.uis_stock.admin_elem label,.uis_stock.admin_elem input{color:inherit!important}
.uis_stock_preview{padding:5px;margin-top:4px}
.uis_seo_description textarea{height:40px;width:100%;margin-bottom:10px}
.uis_opti{clear:right}
.uis_opti input{width:70%}
.uis_opt_i{width:60px;float:right}
.uis_opt_m,.uis_opt_p,.uis_opt_e,.uis_opt_v{cursor:pointer;background:transparent url(/assets/icons/roundminus.gif) no-repeat 0 0;float:right;width:16px;height:16px}
.uis_opt_p{background-image:url(/assets/icons/roundplus.gif)}
.uis_opt_e{background-image:url(/assets/icons/edit_orig.gif)}
.uis_opt_v{background-image:url(/assets/icons/apply.gif)}
.uis_img_ed{left:calc(50% - 32px);opacity:.7;position:absolute;top:calc(50% - 32px)}
.uis_desc_ed_c{float:left;position:relative;width:100%;height:0;z-index:100}
.uis_desc_ed{position:absolute;left:40%;top:5px;filter:alpha(opacity=70);-moz-opacity:.7;opacity:.7}
.uis_opt table{width:100%}
.uis_seo_description textarea{box-sizing:border-box;min-height:75px}
.uis_desc{min-height:150px}
.uis_cart{box-shadow:0 0 2px rgba(0,0,0,.1),2px 2px 2px 0 rgba(0,0,0,.15);float:right;margin:4px;min-width:200px;cursor:pointer;position:relative;z-index:20}
.uis_cart .uis_headf&gt;.fonticon{color:#6ce509;font-size:24px;vertical-align:bottom}
.uis_cart .uis_cresume{padding:3px}
.uis_cart .uis_cextend ul li.uis_shipping_infos_cart_summary:hover .uis_prodInfos&gt;div:first-child{color:inherit}
.uis_cart.active:hover,.uis_cart.hovered{border-bottom-right-radius:0;box-shadow:0 0 2px rgba(0,0,0,.2),2px 2px 2px 0 rgba(0,0,0,.3)}
.uis_cart::after{position:absolute;content:&quot;&quot;;bottom:0;right:0;height:6px;width:100%;background-color:#fff}
.uis_ul_w{padding:5px 0}
.uis_bsa .fonticon{font-size:17px;margin-right:8px;position:relative;top:2px}
.uis_addcart{overflow:auto}
.uis_addcart input{float:left;margin-top:6px}
.uis_bill{display:none}
.uis_bill .title{clear:both;margin:10px;text-align:center;font-size:26px}
.uis_bill table{width:calc(100% - 2px)}
.uis_bill thead{background:#fff;color:#000}
.uis_bill thead td,.uis_bill tfoot td{padding:8px;text-align:center;font-weight:700}
.uis_bill tbody td{vertical-align:middle;padding:5px 10px;line-height:25px}
.uis_bill tbody td span.uis_opts ul{padding-left:10px}
.uis_bill tbody td span.uis_opts li{list-style-position:inside}
.uis_bill tfoot td.uis_extra{font-weight:400}
.uis_bill tfoot td.uis_extra .uis_options_table,.uis_bill .uis_coupon_txt{font-size:12px}
.uis_bill .uis_options_td{text-align:left;padding:2px 10px;width:50%}
.uis_bill .uis_options_td.uis_extra_name{text-align:right}
.uis_bill thead td.uis_cerr{padding:0;background-color:#fdf8c4;color:#B00}
.uis_bill .uis_coup{margin:10px 20px}
.uis_bill .uis_coup td{text-align:left}
.uis_bill .uis_coup a{font-style:italic}
.uis_bill .uis_coup_f{display:none;background:#EEE;border:2px #AAA dotted;margin:2px;padding:2px;width:240px;text-align:center}
.uis_sum_grid{display:grid;grid-template-columns:1fr 300px;grid-gap:10px;grid-template-rows:1fr}
.uis_summary_content{padding:10px}
.payment_method,.uis_order_pri&gt;.uis_summary_use_shipping,.uis_summary_address,.uis_summary_pickup_point{display:inline-block;vertical-align:top;padding:5px 10px;min-height:100px}
.uis_summary_prod{margin:10px 0;padding:10px;display:grid;grid-template-columns:130px 1fr}
.uis_summary_options{padding:10px}
.uis_order_sum{padding-top:5px}
.uis_order_pri{padding:5px}
.uis_order_sum .site_button{display:block;margin-bottom:10px;text-align:center}
.uis_order_sum&gt;h3{padding-left:10px}
.uis_summary_order_d{padding:3px 10px 0}
.uis_sum_items{display:grid;grid-template-rows:1fr;grid-template-columns:1fr 75px;margin-bottom:8px}
.uis_sum_items.total_sum{font-weight:700;border-top:1px solid rgba(0,0,0,.5);padding-top:5px}
.uis_prod_responsive .payment_method,.uis_prod_responsive .uis_order_pri&gt;.uis_summary_use_shipping,.uis_prod_responsive .uis_summary_address{display:block;min-height:auto;margin-bottom:10px}
.uis_prod_responsive .uis_sum_grid{grid:none;display:flex;flex-direction:column;width:100%}
.uis_prod_responsive .uis_order_sum{margin-bottom:20px;text-align:left;order:0}
.uis_prod_responsive .uis_order_pri{order:1}
.uis_bill_breadcrumb{max-width:700px;text-align:center;margin:0 auto;user-select:none}
.uis_bill_breadcrumb .uis_step_selected{font-weight:700}
.uis_bill_breadcrumb&gt;div{display:inline-block;vertical-align:top;margin:5px 10px;cursor:default;position:relative}
.uis_bill_breadcrumb&gt;div::before{position:absolute;content:&quot;&gt;&quot;;left:-15px;font-weight:700;font-family:monospace;top:-2px}
.uis_bill_breadcrumb&gt;div:first-child::before{display:none}
.uis_bill_breadcrumb&gt;div.uis_step_selected::after{position:absolute;content:&quot;&quot;;height:1px;left:0;right:0;bottom:-2px}
.uis_opt table tr td:first-child{width:150px}
.uis_opt input[type=text]{width:100%;box-sizing:border-box}
.uis_hidden_data&gt;div:not(.admin_elem){display:inline-block;margin:5px}
.uis_options_error{border:1px solid #700;background-color:#FAA;font-weight:700;color:#000}
.uis_options_error_message{background-color:#e04e4e;color:#fff;padding:3px 5px;line-height:16px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}
.uis_bill_mn{margin:10px 0;padding:10px;clear:both}
.uis_bill_mn h2{margin:0 0 10px;text-align:center;border-bottom:1px solid #fff}
.uis_prodcart{display:none;font-style:italic;clear:both}
.uis_alert{position:relative}
.uis_alert div{display:none;position:relative;padding:5px;background-color:#ffffd9;color:#000;border:1px solid #A7A772;white-space:nowrap;font-size:75%}
.uis_bill .uis_alert div{top:0;left:0;right:auto;top:auto}
* html .uis_alert div,* html .uis_bill .uis_alert div{top:-5px}
.uis_addCat{cursor:pointer}
.uis_bill td.uis_ar{text-align:right}
.uis_bi,.uis_br{float:left;margin:0 5px}
.uis_br{float:right;font-size:20px;position:relative;top:2px;color:#e04e4e;padding:3px;cursor:pointer}
.uis_c_rem{float:right;visibility:hidden;color:#e04e4e}
.uis_br:hover,.uis_br:hover+.uis_c_rem{visibility:visible;color:#d62525}
.uis_pp{padding:0 2px}
.uis_pp img{margin-top:6px;height:18px;width:59px}
.uis_add_cart_w{text-align:center}
#TB_window .uis_add_to_cart_infos{margin-bottom:10px}
.uis_btn{margin:5px;overflow:hidden;cursor:pointer;display:inline-block}
.uis_btn a{color:#fff;text-decoration:none}
.component .uis_pf_err,.uis_pf_err{border:2px solid #B00!important;background-color:#fdf8c4!important}
.uis_previous_coordinates&gt;div{float:left;line-height:normal;border:1px #bbb solid;padding:5px;margin-right:5px}
.UI_Store ._ui18_member_signin select,.UI_Store ._ui18_member_signup input:not([type=checkbox]),.UI_Store ._ui18_member_signup select,.UI_Store ._ui18_member_signin input{max-width:200px;width:calc(100% - 10px)}
.uis_hidden_data{display:none}
.uis_prod input.uis_prod_name:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]){font-size:34px;width:100%}
.uis_prod input.uis_set_price:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]){font-size:20px;color:#B00;width:85px;font-weight:700}
.uis_prod input.uis_set_strike_price:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]){font-size:20px;color:#777;width:85px;font-weight:400;text-decoration:line-through}
.uis_prod input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_prod input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_custom_stock_sentence_product_list input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_custom_stock_sentence_product_list input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]){transition:color .15s linear;font-size:20px;width:60px}
.uis_prod input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight,.uis_prod input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight,input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight,input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight,.uis_custom_stock_sentence_product_list input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight,.uis_custom_stock_sentence_product_list input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight,.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight,.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight{color:#69c91a}
.uis_prod input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low,.uis_prod input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low,input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low,input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low,.uis_custom_stock_sentence_product_list input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low,.uis_custom_stock_sentence_product_list input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low,.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low,.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low{color:#e87035}
.uis_prod .hight,.uis_prod.hight,input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) .hight,input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight,.uis_custom_stock_sentence_product_list .hight,.uis_custom_stock_sentence_product_list.hight,.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) .hight,.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight{color:#69c91a}
.uis_prod .hight input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_prod.hight input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) .hight input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_custom_stock_sentence_product_list .hight input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_custom_stock_sentence_product_list.hight input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) .hight input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).hight input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]){color:#69c91a}
.uis_prod .low,.uis_prod.low,input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) .low,input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low,.uis_custom_stock_sentence_product_list .low,.uis_custom_stock_sentence_product_list.low,.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) .low,.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low{color:#e87035}
.uis_prod .low input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_prod.low input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) .low input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_custom_stock_sentence_product_list .low input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_custom_stock_sentence_product_list.low input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]) .low input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]),.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).low input.uis_set_stock:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]){color:#e87035}
.uis_prod.uisa_s,input.uis_custom_stock_sentence_input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).uisa_s,.uis_custom_stock_sentence_product_list.uisa_s,.uis_form-control_replenishment_date:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).uisa_s{color:#b00}
.UI_Store:not(.uisl_h) .uis_custom_stock_sentence_product_list{display:block;text-align:center}
.uis_addCat_wrapper li.uis_ed{padding:3px 10px 3px 25px;box-sizing:border-box}
.uis_addCat_wrapper li.uis_ed::after{left:9px}
.UI_Store .uis_list li{position:relative}
.uis_options_table{display:table}
.uis_options_tr{display:table-row}
.uis_options_td{display:table-cell}
.uis_prod_responsive .uis_options_table{display:block}
.uis_prod_responsive .uis_options_tr{display:block}
.uis_prod_responsive .uis_options_td,.uis_prod_responsive .uis_bill .uis_options_td.uis_extra_name{display:block;width:100%;padding-left:0;padding-right:0;text-align:center}
.uis_prod_responsive .uis_previous_coordinates&gt;div{float:none;margin:0 0 10px}
.uis_prod_responsive .uis_previous_coordinates&gt;div .uis_btn{margin:5px 0}
.uis_prod_responsive .uis_save_shipping{float:none!important;display:inline-block;margin-top:10px}
.uis_nbr_items{font-size:70%}
.uis_shipping_discount{background-color:#eda93a;border-radius:2px;font-weight:700;color:#fff;cursor:default;padding:0 5px}
.uis_shipping_infos_cart_summary{cursor:default}
.uis_shipping_infos_cart_summary .uis_shipping_discount{background-color:transparent;color:inherit;padding:0;font-weight:400}
.uis_shipping_undeliverable{color:red}
.uis_delivery_date{font-weight:400}
.change_country_button{font-weight:400;font-size:70%}
.uis_pay_btn{margin:5px 0}
.uis_validate_quantity{color:green;display:none;cursor:pointer}
.uis_cursor_quantity{display:inline;position:relative;margin-left:2px}
.uis_plus_quantity,.uis_minus_quantity{cursor:pointer;position:absolute;top:-5px}
.uis_minus_quantity{top:8px}
.uis_shipping_infos_product{margin-top:20px}
.uis_cb_form{background:#fff}
#form_cb_wrapper{padding:40px;text-align:center;margin:10px;border-radius:2px;border:1px solid #d0d0d0}
.uis_ship .select_style{max-width:450px;margin:5px 0}
.uis_ship .select_style select{width:100%}
.uis_shipping_infos_cart{text-align:left;padding-bottom:5px}
.uis_member_email_status{background-color:#ffb9a4;border-radius:2px;padding:2px;color:#000}
input[type=radio].uis_custom_stock_sentence_radiobutton,input[type=radio].uis_replenishment_date_radiobutton,input[type=radio].uis_stock_radiobutton,input[type=radio].uis_pre_order_date_radiobutton{margin-right:15px}
.uis_stock{display:inline;margin-right:20px}
.uis_stock_sentence_show_more.admin_elem{margin:auto}
.uis_final_stock_sentence{font-size:20px;font-weight:600}
#body div.uis_big_container.uis_replenishment_date.admin_elem .input-group-addon,#body div.uis_big_container.uis_pre_order_date.admin_elem .input-group-addon{display:none}
.uis_colors_wrapper{margin-top:10px}
.uis_custom_stock_sentence_color{width:18px;height:18px;display:inline-block;cursor:pointer;border-radius:50%;position:relative;margin:0 5px;top:1px}
.uis_custom_stock_sentence_color.red{background-color:#b00}
.uis_custom_stock_sentence_color.orange{background-color:#e87035}
.uis_custom_stock_sentence_color.green{background-color:#69c91a}
.uis_custom_stock_sentence_color.selected_color::after{position:absolute;content:&quot;&quot;;width:14px;height:14px;box-shadow:0 0 0 2px #fff inset;border-radius:50%;top:2px;left:2px}
.uis_custom_stock_sentence_color:first-child{margin-left:0}
.uis_prod_bloc:not(.open) .uis_colors_wrapper{display:none!important}
#body .block_selected .uis_stock_set_mode{display:block;margin-bottom:5px}
#body .block_selected .uis_stock_set_mode&gt;div{display:inline-flex;padding:10px;min-width:440px;border:1px solid #ccc;align-items:center;position:relative}
#body .block_selected .uis_stock_set_mode&gt;div .form-group,#body .block_selected .uis_stock_set_mode&gt;div .input-group{margin:0}
#body .block_selected .uis_stock_set_mode label{width:100%}
#body .block_selected .uis_stock_set_mode .iconHelp{position:absolute;right:5px;top:calc(50% - 5px)}
input.uis_custom_stock_sentence_input,input.uis_form-control_replenishment_date,input.uis_form-control_pre_order_date{margin-left:15px}
input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]){width:180px!important}
input.uis_form-control_pre_order_date:not([type=checkbox]):not([type=range]):not([type=file]):not([type=button]):not([type=submit]).uisa_s{color:#b00!important}
.tablesorter.uis_prices_options_table .fonticon{cursor:pointer}
tbody.uis_custom_prices_tbody tr td input.uis_input_number{width:4.5em}
tbody.uis_custom_prices_tbody .nice_select li{color:#fff}
table.custom_prices_table_viewer td{width:4.5em}
.uis_delete_custom_price{font-size:16px;cursor:pointer;color:red;position:relative;top:8px;left:20px}
.uis_custom_prices_header{font-weight:700}
.uis_stock_infos{margin:10px 0;font-weight:700}
.uis_custom_prices .uis_qte_prod{width:32px;float:left;margin:8px}
.uis_unit_price_with_detail{display:none}</style></uidget>