Advertisement
Igor150195

Untitled

Apr 7th, 2021
2,568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Smarty 3.29 KB | None | 0 0
  1. {assign var="css" value=$css|default:"default"}
  2. {assign var="js" value=$js|default:"default"}
  3.  
  4. {if $cookie}
  5.     <script type='text/javascript' src='/shared/s3/js/cookie.js'></script>
  6. {/if}
  7.  
  8. {if $jquery}
  9.     <script type="text/javascript" src="/g/libs/jquery/1.10.2/jquery.min.js"></script>
  10. {/if}
  11.  
  12. {if $reset}
  13.     <link rel="stylesheet" type="text/css" href="/g/shop2v2/default/css/reset.less.css">
  14. {/if}
  15.  
  16. {if $shop2_local_css}
  17.     <link rel="stylesheet" type="text/css" href="images/css/theme.less.css">
  18. {else}
  19.     {if $css!="none"}<link rel="stylesheet" type="text/css" href="/g/shop2v2/{$css}/css/theme.less.css">{/if}
  20. {/if}
  21.  
  22. {if !$shop2_disable_scripts}
  23.     <script type="text/javascript" src="/g/printme.js"></script>
  24.     <script type="text/javascript" src="/g/shop2v2/default/js/tpl.js"></script>
  25.     <script type="text/javascript" src="/g/shop2v2/default/js/baron.min.js"></script>
  26. {else}
  27.     <script type="text/javascript" src="/g/shop2v2/default/js/shop2v2-plugins.js" defer></script>
  28. {/if}
  29.  
  30. {if $shop2_enable_min_js}
  31.     <script type="text/javascript" src="/g/shop2v2/{$js}/js/shop2.2.min.js" defer></script>
  32. {else}
  33.     <script type="text/javascript" src="/g/shop2v2/{$js}/js/shop2.2.js"></script>
  34. {/if}
  35.  
  36. {strip}
  37. <script type="text/javascript" defer>
  38.     test_load().then(function() {ldelim}
  39.         shop2.init({ldelim}
  40.             "productRefs": {json array=$product_refs},
  41.             "apiHash": {json array=$api|default:$shop2.api},
  42.             "hash": {json array=$shop2.hash},
  43.             "verId": {$site.ver_id},
  44.             "mode": "{$mode}",
  45.             "step": "{$step}",
  46.             "uri": "{$shop2.uri}",
  47.             "IMAGES_DIR": "{$IMAGES_DIR}",
  48.             "my": {$shop2.my|@json_encode},
  49.             "maps_yandex_key":"{$site.reg.common_settings.yandex_map_key}",
  50.             "maps_google_key":"{$site.reg.common_settings.google_map_key}"
  51.         {rdelim});
  52.         {if $folder}shop2.filter._pre_params = "&s[folder_id]={$folder.folder_id}";{/if}
  53.         {if $vendor}shop2.filter._pre_params = "&s[vendor_id]={$vendor.vendor_id}";{/if}
  54.         {if !empty($site.reg.se.facets) && $site.reg.se.searcher == 'S3\\Shop2\\Search\\ElasticSearcher'}
  55.             shop2.facets.enabled = true;
  56.         {/if}
  57.         {if $site.reg.module.deligate}
  58.             shop2.delivery.deligate = true;
  59.         {/if}
  60.     {rdelim});
  61. </script>
  62.  
  63.     {if $shop2.thumb_width != 200 || $shop2.thumb_height != 190 || $shop2.card_image_width != 200 || $shop2.card_image_height != 190}
  64.         {"\n"}
  65.         <style type="text/css">
  66.             .product-item-thumb {ldelim}
  67.                 width: {$shop2.thumb_width}px;
  68.             {rdelim}
  69.  
  70.             .product-item-thumb .product-image, .product-item-simple .product-image {ldelim}
  71.                 height: {$shop2.thumb_height}px;
  72.                 width: {$shop2.thumb_width}px;
  73.             {rdelim}
  74.  
  75.             .product-item-thumb .product-amount .amount-title {ldelim}
  76.                 width: {$shop2.thumb_width-96}px;
  77.             {rdelim}
  78.  
  79.             .product-item-thumb .product-price {ldelim}
  80.                 width: {$shop2.thumb_width-50}px;
  81.             {rdelim}
  82.  
  83.             .shop2-product .product-side-l {ldelim}
  84.                 width: {$shop2.card_image_width}px;
  85.             {rdelim}
  86.  
  87.             .shop2-product .product-image {ldelim}
  88.                 height: {$shop2.card_image_height}px;
  89.                 width: {$shop2.card_image_width}px;
  90.             {rdelim}
  91.  
  92.             {assign var="width" value=$shop2.card_image_width/3|string_format:"%d"}
  93.             {assign var="width" value=$width-10}
  94.             .shop2-product .product-thumbnails li {ldelim}
  95.                 width: {$width}px;
  96.                 height: {$width}px;
  97.             {rdelim}
  98.         </style>
  99.     {/if}
  100.  
  101. {/strip}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement