Please note this website is intended for Canada, in order to ensure compliance with local legal requirements we need to redirect you to the country you are located in.
CONTINUE
{*$product_data1 = fn_buy_together_get_chains(['product_id' => 6328, 'status' => 'A'], $smarty.session.auth)}
{$product_data1[0]['products']|fn_print_r}
{$total_val}
{foreach from=$product_data1[0]['products'] item=product}
{$val = $product['bt_min_qty'] * $product['modifier']}
{$total_val = $total_val + $val}
{/foreach}
{$total_val}
{$product_data11 = fn_buy_together_get_chains(['product_id' => 6328, 'status' => 'A'], $smarty.session.auth)}
{foreach from=$product_data11[0]['products'] item=product}
{$val = $product['bt_min_qty'] * $product['modifier']}
{$priceIlumaOne = $priceIlumaOne + $val}
{/foreach*}
{$product_ids_quick_view = []}
{if $runtime.company_id == 23}
{* SK *}
{$product_ids_quick_view = [6280, 6267, 6257, 5119, 6373, 6372, 6510, 6500, 4223, 5955, 4262, 6452, 7238, 7237, 7236, 6487, 6468, 6403, 6393]}
{elseif $runtime.company_id == 22}
{* AB *}
{$product_ids_quick_view = [6272, 6259, 6249, 6376, 6377, 6705, 5072, 6517, 6334, 6340, 2689, 6348, 6349, 6350, 6361, 6473, 6502, 6511, 6514, 6347, 6522, 6330, 4999, 4730, 5945, 4246, 4207, 2691, 6325, 6282, 6321, 6317, 6313, 6305, 6304, 6289, 6479, 7230, 7231, 7232, 6385, 6442, 6395, 6454]}
{elseif $runtime.company_id == 1}
{* BC *}
{$product_ids_quick_view = [6250, 6260, 6273, 6378, 6379, 6707, 5082, 6518, 6353, 6354, 6362, 6503, 6512, 6515, 6352, 6520, 6523, 2694, 4209, 4249, 4729, 5946, 2692, 6283, 6291, 6306, 6307, 6314, 6318, 6322, 6327, 6331, 6335, 6342, 6351, 6386, 6396, 6443, 6455, 6470, 6480, 7233, 7234, 7235]}
{elseif $runtime.company_id == 21}
{* ON *}
{$product_ids_quick_view = [6278, 6265, 6255, 6381, 6383, 5077, 6524, 6332, 6336, 6337, 2695, 6357, 6358, 6359, 6363, 6504, 6513, 6516, 6519, 6521, 6356, 6328, 5638, 4965, 4731, 5952, 4258, 4230, 2697, 6323, 6316, 6312, 6311, 6310, 6292, 6284, 7225, 7228, 7229, 6401, 6485, 6391, 6450, 6465, 6471, 6744]}
{elseif $runtime.company_id == 24}
{* MB *}
{$product_ids_quick_view = [6274, 6261, 6251, 6382, 6380, 5090, 6505, 6475, 4216, 5947, 4250, 6446, 7241, 7240, 7239, 6481, 6456, 6397, 6387]}
{elseif $runtime.company_id == 27}
{* NB *}
{$product_ids_quick_view = [6275, 6262, 6252, 6365, 6364, 5095, 6506, 6477, 4215, 5948, 4253, 6447, 7244, 7243, 7242, 6482, 6457, 6398, 6388]}
{elseif $runtime.company_id == 28}
{* PEI *}
{$product_ids_quick_view = [6279, 6266, 6256, 6371, 6370, 5117, 6509, 6498, 4221, 5954, 4261, 6451, 7250, 7249, 7248, 6486, 6466, 6402, 6392]}
{elseif $runtime.company_id == 20}
{* Publication *}
{$product_ids_quick_view = [6248, 6258, 6271, 6438, 6374, 6375, 6429, 6430, 6431, 6432, 6433, 6434, 6435, 6436, 6437, 6439, 6440, 6746, 5065, 5569, 5570, 5571, 5572, 5573, 5574, 6425, 6360, 6459, 6460, 6461, 6462, 6463, 6281, 2700, 4274, 4728, 4990, 5956, 2698, 6287, 6308, 6309, 6315, 6319, 6320, 6324, 6329, 6333, 6338, 6343, 6344, 6345, 6346, 6384, 6394, 6404, 6441, 6453, 6469, 6478, 6631, 6671, 7193, 7222, 7223, 7224]}
{/if}
{$product_data = []}
{$variants = []}
{$i=0}
{$products|fn_print_r}
{foreach from=$products item=$product}
{if !$product['product_id']|in_array:$product_ids_quick_view}
{continue}
{/if}
{$product_data = $product}
{$productsxx[$i]['id'] = $product_data['product_id']}
{$productsxx[$i]['name'] = $product_data['product']}
{$productsxx[$i]['price'] = $product_data['price']}
{$productsxx[$i]['amount'] = $product_data['amount']}
{$productsxx[$i]['img'] = $product_data['main_pair']['detailed']['image_path']|fn_url}
{$productsxx[$i]['desc'] = {$product_data['full_description']|replace:"'":"" nofilter}}
{$productsxx[$i]['desc'] = {$product_data['full_description']|replace:'"':"" nofilter}}
{* start variant *}
{$combinations = $product_data['product_options']}
{$option_val = 0}
{foreach from=$combinations key=$k item=$sub_array}
{if $sub_array['option_type'] == 'L'}
{$option_val = $k}
{/if}
{/foreach}
{$j = 0}
{foreach from=$combinations[$option_val]['variants'] key=$k item=$variant}
{$productsxx[$i]['variant'][$j]['variant_id'] = $j}
{$productsxx[$i]['variant'][$j]['current_variant_id'] = $variant['variant_id']}
{$productsxx[$i]['variant'][$j]['option_id'] = $variant['option_id']}
{$productsxx[$i]['variant'][$j]['hexcode'] = $variant['hexadecimal_color']}
{$productsxx[$i]['variant'][$j]['name'] = $variant['variant_name']}
{$productsxx[$i]['variant'][$j]['image_path'] = $productsxx[$i]['img']}
{foreach from=$variant['image_pairs'] key=$k item=$variant_image}
{$productsxx[$i]['variant'][$j]['image_path'] = $variant_image['icon']['image_path']|fn_url}
{/foreach}
{$j = $j + 1}
{/foreach}
{* end variant *}
{$i = $i + 1}
{/foreach}
{$productsxx = json_encode($productsxx)}
{$productsxx}