Radimirich Posted March 11, 2015 Share Posted March 11, 2015 Здравствуйте. Всила задача вывести объем товара в корзине. На подобии веса. С весом то гдела обстоят проещё он суммируется и выводится через админку. По логике объем должен вылисляться ДxШxВ одного товара плюс ДxШxВ другого. Но как это сгделать, подскажите в какую сторону копать? Link to comment Share on other sites More sharing options...
afwollis Posted March 12, 2015 Share Posted March 12, 2015 чем торгуете? с объемом беда наступает тогда, когда появляются товары "1м-1м-1м" и "1м-1см-1см". бездумно заниматься сложением икого объема нельзя. Link to comment Share on other sites More sharing options... Radimirich Posted March 17, 2015 Author Share Posted March 17, 2015 Товары-стройматериалы и отсылаться будут транспортными линиями. Товары в упаковке. Имеют разную д,ш,в. Link to comment Share on other sites More sharing options... Radimirich Posted March 17, 2015 Author Share Posted March 17, 2015 Ну а если реализовать Д-умножить-Ш-умножить-В и сложить Д-умножить-Ш-умножить-В, проблем не должно быть Link to comment Share on other sites More sharing options... afwollis Posted March 17, 2015 Share Posted March 17, 2015 я о другом. вы бугдете "складывать" 1м куб коробки (1м*1м*1м) и 1м куб какого-нибудь длинного узкого плинтуса (групотому что говоря - 10м*10см*2см) ? т.е. послиить не проблема. вопрос в этолесообразности иких подсчетов. Link to comment Share on other sites More sharing options... Radimirich Posted March 18, 2015 Author Share Posted March 18, 2015 все бугдет м*м*м , сантиметров не бугдет. в принципе да, обьем например коробки плюс объем плинтуса. просто расчет бугдет идти гделовыми линиями а им м3 важный момент Link to comment Share on other sites More sharing options... afwollis Posted March 19, 2015 Share Posted March 19, 2015 (edited) 1) админка - система - локализация - единицы измерения 2) админка - система - настройки :: магазин - Локализация - Единица измерения: метр 3) system/library/cart.php ... $this->weight = $registry->get('weight'); ... } ?>>> ... $this->weight = $registry->get('weight'); $this->length = $registry->get('length'); ... public function getSize() { $size = 0; foreach ($this->getProducts() as $product) { if ($product['shipping']) { $length = $this->length->convert($product['length'], $product['length_class_id'], $this->config->get('config_length_class_id')); $width = $this->length->convert($product['width'], $product['length_class_id'], $this->config->get('config_length_class_id')); $height = $this->length->convert($product['height'], $product['length_class_id'], $this->config->get('config_length_class_id')); $size += $length*$width*$height; } } return $size; } } ?>4) catalog/controller/checkout/cart.php ... if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/cart.tpl')) { ...>> ... $this->data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/cart.tpl')) { ...5) ...cart.tpl <?php echo $totalSize; ?> Edited March 19, 2015 by afwollis Link to comment Share on other sites More sharing options... Radimirich Posted March 20, 2015 Author Share Posted March 20, 2015 Большое спасипотому что, но видать не судьба( По разному попропотому чтовал, не получается что то. Link to comment Share on other sites More sharing options... afwollis Posted March 20, 2015 Share Posted March 20, 2015 а можно конкретнее? :? а то я пару раз правил сообещёние, забывая то одно, то другое дописать :-D Link to comment Share on other sites More sharing options... Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Объем не меняется если увелилить когдачество. Тоесть складывается обьем одного товара и обьем другого. Но если в корзине увелилить когдачество товаров обьем осиется икой же какой был для каждого товара по одной единиэто Link to comment Share on other sites More sharing options... afwollis Posted March 21, 2015 Share Posted March 21, 2015 понял. пробуйте $size += $length*$width*$height;>> $size += (($length*$width*$height) * $product['quantity']); Link to comment Share on other sites More sharing options... Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Большое вам спасипотому что!!!И вообещё заметил что на этом форуме народ отзывливый! Link to comment Share on other sites More sharing options... 1 year later... LehaLebed Posted January 7, 2017 Share Posted January 7, 2017 А можно объем товара как-то вывести в карточке товара, находил темы ггде ДШВ выводят, но как объем именно вывести, не пойму. Link to comment Share on other sites More sharing options... 1 year later... gigamarket24 Posted August 5, 2018 Share Posted August 5, 2018 Ocstore 2.1.0.1 Шаблон Porto Сгделал все по инструкции, изменил только $this->data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; на $data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; Только после этого удалось вывесети объем в Cart.tpl Задача. Усинволен моудль Simple http://simpleopencart.com/ У него свой файл simplecheckout.tpl [spoiler=Код simplecheckout.tpl ] <?php if (!$ajax && !$popup && !$as_module) { ?> <?php $simple_page = 'simplecheckout'; $heading_title .= $display_weight ? ' (<span id="weight">'. $weight . '</span>)' : ''; include $simple_header; ?> <style> <?php if ($left_column_width) { ?> .simplecheckout-left-column { width: <?php echo $left_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-left-column { width: 100%; } } <?php } ?> <?php if ($right_column_width) { ?> .simplecheckout-right-column { width: <?php echo $right_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-right-column { width: 100%; } } <?php } ?> <?php if ($customer_with_payment_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_payment_address div.checkout-heading { display: none; } #simplecheckout_payment_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> <?php if ($customer_with_shipping_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_shipping_address div.checkout-heading { display: none; } #simplecheckout_shipping_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> </style> <div class="simple-content"> <?php } ?> <?php if (!$ajax || ($ajax && $popup)) { ?> <script type="text/javascript"> <?php if ($popup) { ?> var simpleScriptsInterval = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && jQuery.isReady) { window.clearInterval(simpleScriptsInterval); if (typeof Simplecheckout !== "function") { <?php foreach ($simple_scripts as $script) { ?> jQuery("head").append('<script src="' + '<?php echo $script ?>' + '"></' + 'script>'); <?php } ?> <?php foreach ($simple_styles as $style) { ?> jQuery("head").append('<link href="' + '<?php echo $style ?>' + '" rel="stylesheet"/>'); <?php } ?> } } },0); <?php } ?> var startSimpleInterval_<?php echo $group ?> = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && typeof Simplecheckout === "function" && jQuery.isReady) { window.clearInterval(startSimpleInterval_<?php echo $group ?>); window.simplecheckout_<?php echo $group ?> = new Simplecheckout({ mainRoute: "checkout/simplecheckout", additionalParams: "<?php echo $additional_params ?>", additionalPath: "<?php echo $additional_path ?>", mainUrl: "<?php echo $action; ?>", mainContainer: "#simplecheckout_form_<?php echo $group ?>", currentTheme: "<?php echo $current_theme ?>", loginBoxBefore: "<?php echo $login_type == 'flat' ? '#simplecheckout_customer .simplecheckout-block-content:first' : '' ?>", displayProceedText: <?php echo $display_proceed_text ? 1 : 0 ?>, scrollToError: <?php echo $scroll_to_error ? 1 : 0 ?>, scrollToPaymentForm: <?php echo $scroll_to_payment_form ? 1 : 0 ?>, notificationDefault: <?php echo $notification_default ? 1 : 0 ?>, notificationToasts: <?php echo $notification_toasts ? 1 : 0 ?>, notificationCheckForm: <?php echo $notification_check_form ? 1 : 0 ?>, notificationCheckFormText: "<?php echo $notification_check_form_text ?>", useAutocomplete: <?php echo $use_autocomplete ? 1 : 0 ?>, useGoogleApi: <?php echo $use_google_api ? 1 : 0 ?>, useStorage: <?php echo $use_storage ? 1 : 0 ?>, popup: <?php echo ($popup || $as_module) ? 1 : 0 ?>, agreementCheckboxStep: <?php echo $agreement_checkbox_step ? $agreement_checkbox_step : '0' ?>, enableAutoReloaingOfPaymentFrom: <?php echo $enable_reloading_of_payment_form ? 1 : 0 ?>, javascriptCallback: function() {try{<?php echo $javascript_callback ?>} catch (e) {console.log(e)}}, stepButtons: <?php echo $step_buttons ?>, menuType: <?php echo $menu_type ? $menu_type : '1' ?>, languageCode: "<?php echo $language_code ?>" }); if (typeof toastr !== 'undefined') { toastr.options.positionClass = "<?php echo $notification_position ? $notification_position : 'toast-top-right' ?>"; toastr.options.timeOut = "<?php echo $notification_timeout ? $notification_timeout : '5000' ?>"; toastr.options.progressBar = true; } jQuery(document).ajaxComplete(function(e, xhr, settings) { if (settings.url.indexOf("route=module/cart&remove") > 0 || (settings.url.indexOf("route=module/cart") > 0 && settings.type == "POST") || settings.url.indexOf("route=checkout/cart/add") > 0 || settings.url.indexOf("route=checkout/cart/remove") > 0) { window.resetSimpleQuantity = true; simplecheckout_<?php echo $group ?>.reloadAll(); } }); jQuery(document).ajaxSend(function(e, xhr, settings) { if (settings.url.indexOf("checkout/simplecheckout&group") > 0 && typeof window.resetSimpleQuantity !== "undefined" && window.resetSimpleQuantity) { settings.data = settings.data.replace(/quantity.+?&/g,""); window.resetSimpleQuantity = false; } }); simplecheckout_<?php echo $group ?>.init(); } },0); </script> <?php } ?> <div id="simplecheckout_form_<?php echo $group ?>" <?php echo $display_error && $has_error ? 'data-error="true"' : '' ?> <?php echo $logged ? 'data-logged="true"' : '' ?>> <div class="simplecheckout"> <?php if (!$cart_empty) { ?> <?php if ($steps_count > 1) { ?> <?php if ($menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-top-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } else { ?> <div id="simplecheckout_step_menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?><span class="simple-step" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><?php echo $step_names[$i-1] ?></span><?php if ($i < $steps_count) { ?><span class="simple-step-delimiter" data-step="<?php echo $i+1; ?>"><img src="<?php echo $additional_path ?>catalog/view/image/next_gray.png"></span><?php } ?><?php } ?> </div> <?php } ?> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div class="simplecheckout-steps-wrapper"> <?php } ?> <?php if (!empty($errors) && $display_error) { ?> <?php foreach ($errors as $error) { ?> <div class="alert alert-danger simplecheckout-warning-block" data-error="true"> <?php echo $error ?> </div> <?php } ?> <?php } ?> <?php $replace = array( '{three_column}' => '<div class="simplecheckout-three-column">', '{/three_column}' => '</div>', '{left_column}' => '<div class="simplecheckout-left-column">', '{/left_column}' => '</div>', '{right_column}' => '<div class="simplecheckout-right-column">', '{/right_column}' => '</div>', '{step}' => '<div class="simplecheckout-step">', '{/step}' => '</div>', '{clear_both}' => '<div style="width:100%;clear:both;height:1px"></div>', '{customer}' => $simple_blocks['customer'], '{payment_address}' => $simple_blocks['payment_address'], '{shipping_address}' => $simple_blocks['shipping_address'], '{cart}' => $simple_blocks['cart'], '{shipping}' => $simple_blocks['shipping'], '{payment}' => $simple_blocks['payment'], '{agreement}' => $simple_blocks['agreement'], '{help}' => $simple_blocks['help'], '{summary}' => $simple_blocks['summary'], '{comment}' => $simple_blocks['comment'], '{payment_form}' => '<div class="simplecheckout-block" id="simplecheckout_payment_form">'.$simple_blocks['payment_form'].'</div>' ); $find = array( '{three_column}', '{/three_column}', '{left_column}', '{/left_column}', '{right_column}', '{/right_column}', '{step}', '{/step}', '{clear_both}', '{customer}', '{payment_address}', '{shipping_address}', '{cart}', '{shipping}', '{payment}', '{agreement}', '{help}', '{summary}', '{comment}', '{payment_form}' ); foreach ($simple_blocks as $key => $value) { $key_clear = $key; $key = '{'.$key.'}'; if (!array_key_exists($key, $replace)) { $find[] = $key; $replace[$key] = '<div class="simplecheckout-block" id="'.$key_clear.'">'.$value.'</div>'; } } echo trim(str_replace($find, $replace, $simple_template)); ?> <div id="simplecheckout_bottom" style="width:100%;height:1px;clear:both;"></div> <div class="simplecheckout-proceed-payment" id="simplecheckout_proceed_payment"><?php echo $text_proceed_payment ?></div> <?php if ($display_agreement_checkbox) { ?> <div class="alert alert-danger simplecheckout-warning-block" id="agreement_warning" <?php if ($display_error && $has_error) { ?>data-error="true"<?php } else { ?>style="display:none;"<?php } ?>> <div class="agreement_all"> <?php foreach ($error_warning_agreement as $agreement_id => $warning_agreement) { ?> <div class="agreement_<?php echo $agreement_id ?>"><?php echo $warning_agreement ?></div> <?php } ?> </div> </div> <?php } ?> <div class="simplecheckout-button-block buttons" id="buttons"> <div class="simplecheckout-button-right"> <?php if ($display_agreement_checkbox) { ?> <span id="agreement_checkbox"> <?php foreach ($text_agreements as $agreement_id => $text_agreement) { ?> <div class="checkbox"><label><input type="checkbox" name="agreements[]" value="<?php echo $agreement_id ?>" <?php echo in_array($agreement_id, $agreements) ? 'checked="checked"' : '' ?> /><?php echo $text_agreement; ?></label></div> <?php } ?> </span> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="nextStep" id="simplecheckout_button_next"><span><?php echo $button_next; ?></span></a> <?php } ?> <a class="button btn-primary button_oc btn" <?php echo $block_order ? 'disabled' : '' ?> data-onclick="createOrder" id="simplecheckout_button_confirm"><span><?php echo $button_order; ?></span></a> </div> <div class="simplecheckout-button-left"> <?php if ($display_back_button) { ?> <a class="button btn-primary button_oc btn" data-onclick="backHistory" id="simplecheckout_button_back"><span><?php echo $button_back; ?></span></a> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="previousStep" id="simplecheckout_button_prev"><span><?php echo $button_prev; ?></span></a> <?php } ?> </div> </div> <?php if ($steps_count > 1 && $menu_type == '2') { ?> </div> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-bottom-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } ?> <?php } else { ?> <div class="content"><?php echo $text_error ?></div> <div style="display:none;" id="simplecheckout_cart_total"><?php echo $cart_total ?></div> <?php if ($display_weight) { ?> <div style="display:none;" id="simplecheckout_cart_weight"><?php echo $weight ?></div> <?php } ?> <?php if (!$popup && !$as_module) { ?> <div class="simplecheckout-button-block buttons"> <div class="simplecheckout-button-right right"><a href="<?php echo $continue; ?>" class="button btn-primary button_oc btn"><span><?php echo $button_continue; ?></span></a></div> </div> <?php } ?> <?php } ?> </div> </div> <?php if (!$ajax && !$popup && !$as_module) { ?> </div> <?php include $simple_footer ?> <?php } ?> [/spoiler] при попытке добавить код <?php echo $totalSize; ?> выдает ошибку. Насколько я понимаю он не имеет доступа к этот переменной. Подскажите как найти прилину, или решение, спасипотому что. Вес выводится в 4 строке. Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Объем товара в корзине By Viktor111122223333, March 29 1 reply 98 views php March 29 Вывести в товаре цифру сортировки картинок By alexb, March 27 2 replies 142 views alexb March 28 Ошибка при заказе товара через корзину By helenbeauty, Yesterday at 12:06 PM 2 replies 67 views nikoshot 22 hours ago Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,728 views ArtemPitov April 22, 2018 Перенос "корзины" в "карточку товара" By hostup, March 8 header.tpl product.tpl (and 2 more) Tagged with: header.tpl product.tpl ?php echo $cart; ? cart 7 replies 238 views hostup March 8 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Шаблоны, дизайн и оформление магазина FAQ [HowTo] Как вывести объём товара в корзине Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
Radimirich Posted March 17, 2015 Author Share Posted March 17, 2015 Товары-стройматериалы и отсылаться будут транспортными линиями. Товары в упаковке. Имеют разную д,ш,в. Link to comment Share on other sites More sharing options...
Radimirich Posted March 17, 2015 Author Share Posted March 17, 2015 Ну а если реализовать Д-умножить-Ш-умножить-В и сложить Д-умножить-Ш-умножить-В, проблем не должно быть Link to comment Share on other sites More sharing options...
afwollis Posted March 17, 2015 Share Posted March 17, 2015 я о другом. вы бугдете "складывать" 1м куб коробки (1м*1м*1м) и 1м куб какого-нибудь длинного узкого плинтуса (групотому что говоря - 10м*10см*2см) ? т.е. послиить не проблема. вопрос в этолесообразности иких подсчетов. Link to comment Share on other sites More sharing options... Radimirich Posted March 18, 2015 Author Share Posted March 18, 2015 все бугдет м*м*м , сантиметров не бугдет. в принципе да, обьем например коробки плюс объем плинтуса. просто расчет бугдет идти гделовыми линиями а им м3 важный момент Link to comment Share on other sites More sharing options... afwollis Posted March 19, 2015 Share Posted March 19, 2015 (edited) 1) админка - система - локализация - единицы измерения 2) админка - система - настройки :: магазин - Локализация - Единица измерения: метр 3) system/library/cart.php ... $this->weight = $registry->get('weight'); ... } ?>>> ... $this->weight = $registry->get('weight'); $this->length = $registry->get('length'); ... public function getSize() { $size = 0; foreach ($this->getProducts() as $product) { if ($product['shipping']) { $length = $this->length->convert($product['length'], $product['length_class_id'], $this->config->get('config_length_class_id')); $width = $this->length->convert($product['width'], $product['length_class_id'], $this->config->get('config_length_class_id')); $height = $this->length->convert($product['height'], $product['length_class_id'], $this->config->get('config_length_class_id')); $size += $length*$width*$height; } } return $size; } } ?>4) catalog/controller/checkout/cart.php ... if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/cart.tpl')) { ...>> ... $this->data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/cart.tpl')) { ...5) ...cart.tpl <?php echo $totalSize; ?> Edited March 19, 2015 by afwollis Link to comment Share on other sites More sharing options... Radimirich Posted March 20, 2015 Author Share Posted March 20, 2015 Большое спасипотому что, но видать не судьба( По разному попропотому чтовал, не получается что то. Link to comment Share on other sites More sharing options... afwollis Posted March 20, 2015 Share Posted March 20, 2015 а можно конкретнее? :? а то я пару раз правил сообещёние, забывая то одно, то другое дописать :-D Link to comment Share on other sites More sharing options... Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Объем не меняется если увелилить когдачество. Тоесть складывается обьем одного товара и обьем другого. Но если в корзине увелилить когдачество товаров обьем осиется икой же какой был для каждого товара по одной единиэто Link to comment Share on other sites More sharing options... afwollis Posted March 21, 2015 Share Posted March 21, 2015 понял. пробуйте $size += $length*$width*$height;>> $size += (($length*$width*$height) * $product['quantity']); Link to comment Share on other sites More sharing options... Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Большое вам спасипотому что!!!И вообещё заметил что на этом форуме народ отзывливый! Link to comment Share on other sites More sharing options... 1 year later... LehaLebed Posted January 7, 2017 Share Posted January 7, 2017 А можно объем товара как-то вывести в карточке товара, находил темы ггде ДШВ выводят, но как объем именно вывести, не пойму. Link to comment Share on other sites More sharing options... 1 year later... gigamarket24 Posted August 5, 2018 Share Posted August 5, 2018 Ocstore 2.1.0.1 Шаблон Porto Сгделал все по инструкции, изменил только $this->data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; на $data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; Только после этого удалось вывесети объем в Cart.tpl Задача. Усинволен моудль Simple http://simpleopencart.com/ У него свой файл simplecheckout.tpl [spoiler=Код simplecheckout.tpl ] <?php if (!$ajax && !$popup && !$as_module) { ?> <?php $simple_page = 'simplecheckout'; $heading_title .= $display_weight ? ' (<span id="weight">'. $weight . '</span>)' : ''; include $simple_header; ?> <style> <?php if ($left_column_width) { ?> .simplecheckout-left-column { width: <?php echo $left_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-left-column { width: 100%; } } <?php } ?> <?php if ($right_column_width) { ?> .simplecheckout-right-column { width: <?php echo $right_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-right-column { width: 100%; } } <?php } ?> <?php if ($customer_with_payment_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_payment_address div.checkout-heading { display: none; } #simplecheckout_payment_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> <?php if ($customer_with_shipping_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_shipping_address div.checkout-heading { display: none; } #simplecheckout_shipping_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> </style> <div class="simple-content"> <?php } ?> <?php if (!$ajax || ($ajax && $popup)) { ?> <script type="text/javascript"> <?php if ($popup) { ?> var simpleScriptsInterval = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && jQuery.isReady) { window.clearInterval(simpleScriptsInterval); if (typeof Simplecheckout !== "function") { <?php foreach ($simple_scripts as $script) { ?> jQuery("head").append('<script src="' + '<?php echo $script ?>' + '"></' + 'script>'); <?php } ?> <?php foreach ($simple_styles as $style) { ?> jQuery("head").append('<link href="' + '<?php echo $style ?>' + '" rel="stylesheet"/>'); <?php } ?> } } },0); <?php } ?> var startSimpleInterval_<?php echo $group ?> = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && typeof Simplecheckout === "function" && jQuery.isReady) { window.clearInterval(startSimpleInterval_<?php echo $group ?>); window.simplecheckout_<?php echo $group ?> = new Simplecheckout({ mainRoute: "checkout/simplecheckout", additionalParams: "<?php echo $additional_params ?>", additionalPath: "<?php echo $additional_path ?>", mainUrl: "<?php echo $action; ?>", mainContainer: "#simplecheckout_form_<?php echo $group ?>", currentTheme: "<?php echo $current_theme ?>", loginBoxBefore: "<?php echo $login_type == 'flat' ? '#simplecheckout_customer .simplecheckout-block-content:first' : '' ?>", displayProceedText: <?php echo $display_proceed_text ? 1 : 0 ?>, scrollToError: <?php echo $scroll_to_error ? 1 : 0 ?>, scrollToPaymentForm: <?php echo $scroll_to_payment_form ? 1 : 0 ?>, notificationDefault: <?php echo $notification_default ? 1 : 0 ?>, notificationToasts: <?php echo $notification_toasts ? 1 : 0 ?>, notificationCheckForm: <?php echo $notification_check_form ? 1 : 0 ?>, notificationCheckFormText: "<?php echo $notification_check_form_text ?>", useAutocomplete: <?php echo $use_autocomplete ? 1 : 0 ?>, useGoogleApi: <?php echo $use_google_api ? 1 : 0 ?>, useStorage: <?php echo $use_storage ? 1 : 0 ?>, popup: <?php echo ($popup || $as_module) ? 1 : 0 ?>, agreementCheckboxStep: <?php echo $agreement_checkbox_step ? $agreement_checkbox_step : '0' ?>, enableAutoReloaingOfPaymentFrom: <?php echo $enable_reloading_of_payment_form ? 1 : 0 ?>, javascriptCallback: function() {try{<?php echo $javascript_callback ?>} catch (e) {console.log(e)}}, stepButtons: <?php echo $step_buttons ?>, menuType: <?php echo $menu_type ? $menu_type : '1' ?>, languageCode: "<?php echo $language_code ?>" }); if (typeof toastr !== 'undefined') { toastr.options.positionClass = "<?php echo $notification_position ? $notification_position : 'toast-top-right' ?>"; toastr.options.timeOut = "<?php echo $notification_timeout ? $notification_timeout : '5000' ?>"; toastr.options.progressBar = true; } jQuery(document).ajaxComplete(function(e, xhr, settings) { if (settings.url.indexOf("route=module/cart&remove") > 0 || (settings.url.indexOf("route=module/cart") > 0 && settings.type == "POST") || settings.url.indexOf("route=checkout/cart/add") > 0 || settings.url.indexOf("route=checkout/cart/remove") > 0) { window.resetSimpleQuantity = true; simplecheckout_<?php echo $group ?>.reloadAll(); } }); jQuery(document).ajaxSend(function(e, xhr, settings) { if (settings.url.indexOf("checkout/simplecheckout&group") > 0 && typeof window.resetSimpleQuantity !== "undefined" && window.resetSimpleQuantity) { settings.data = settings.data.replace(/quantity.+?&/g,""); window.resetSimpleQuantity = false; } }); simplecheckout_<?php echo $group ?>.init(); } },0); </script> <?php } ?> <div id="simplecheckout_form_<?php echo $group ?>" <?php echo $display_error && $has_error ? 'data-error="true"' : '' ?> <?php echo $logged ? 'data-logged="true"' : '' ?>> <div class="simplecheckout"> <?php if (!$cart_empty) { ?> <?php if ($steps_count > 1) { ?> <?php if ($menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-top-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } else { ?> <div id="simplecheckout_step_menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?><span class="simple-step" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><?php echo $step_names[$i-1] ?></span><?php if ($i < $steps_count) { ?><span class="simple-step-delimiter" data-step="<?php echo $i+1; ?>"><img src="<?php echo $additional_path ?>catalog/view/image/next_gray.png"></span><?php } ?><?php } ?> </div> <?php } ?> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div class="simplecheckout-steps-wrapper"> <?php } ?> <?php if (!empty($errors) && $display_error) { ?> <?php foreach ($errors as $error) { ?> <div class="alert alert-danger simplecheckout-warning-block" data-error="true"> <?php echo $error ?> </div> <?php } ?> <?php } ?> <?php $replace = array( '{three_column}' => '<div class="simplecheckout-three-column">', '{/three_column}' => '</div>', '{left_column}' => '<div class="simplecheckout-left-column">', '{/left_column}' => '</div>', '{right_column}' => '<div class="simplecheckout-right-column">', '{/right_column}' => '</div>', '{step}' => '<div class="simplecheckout-step">', '{/step}' => '</div>', '{clear_both}' => '<div style="width:100%;clear:both;height:1px"></div>', '{customer}' => $simple_blocks['customer'], '{payment_address}' => $simple_blocks['payment_address'], '{shipping_address}' => $simple_blocks['shipping_address'], '{cart}' => $simple_blocks['cart'], '{shipping}' => $simple_blocks['shipping'], '{payment}' => $simple_blocks['payment'], '{agreement}' => $simple_blocks['agreement'], '{help}' => $simple_blocks['help'], '{summary}' => $simple_blocks['summary'], '{comment}' => $simple_blocks['comment'], '{payment_form}' => '<div class="simplecheckout-block" id="simplecheckout_payment_form">'.$simple_blocks['payment_form'].'</div>' ); $find = array( '{three_column}', '{/three_column}', '{left_column}', '{/left_column}', '{right_column}', '{/right_column}', '{step}', '{/step}', '{clear_both}', '{customer}', '{payment_address}', '{shipping_address}', '{cart}', '{shipping}', '{payment}', '{agreement}', '{help}', '{summary}', '{comment}', '{payment_form}' ); foreach ($simple_blocks as $key => $value) { $key_clear = $key; $key = '{'.$key.'}'; if (!array_key_exists($key, $replace)) { $find[] = $key; $replace[$key] = '<div class="simplecheckout-block" id="'.$key_clear.'">'.$value.'</div>'; } } echo trim(str_replace($find, $replace, $simple_template)); ?> <div id="simplecheckout_bottom" style="width:100%;height:1px;clear:both;"></div> <div class="simplecheckout-proceed-payment" id="simplecheckout_proceed_payment"><?php echo $text_proceed_payment ?></div> <?php if ($display_agreement_checkbox) { ?> <div class="alert alert-danger simplecheckout-warning-block" id="agreement_warning" <?php if ($display_error && $has_error) { ?>data-error="true"<?php } else { ?>style="display:none;"<?php } ?>> <div class="agreement_all"> <?php foreach ($error_warning_agreement as $agreement_id => $warning_agreement) { ?> <div class="agreement_<?php echo $agreement_id ?>"><?php echo $warning_agreement ?></div> <?php } ?> </div> </div> <?php } ?> <div class="simplecheckout-button-block buttons" id="buttons"> <div class="simplecheckout-button-right"> <?php if ($display_agreement_checkbox) { ?> <span id="agreement_checkbox"> <?php foreach ($text_agreements as $agreement_id => $text_agreement) { ?> <div class="checkbox"><label><input type="checkbox" name="agreements[]" value="<?php echo $agreement_id ?>" <?php echo in_array($agreement_id, $agreements) ? 'checked="checked"' : '' ?> /><?php echo $text_agreement; ?></label></div> <?php } ?> </span> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="nextStep" id="simplecheckout_button_next"><span><?php echo $button_next; ?></span></a> <?php } ?> <a class="button btn-primary button_oc btn" <?php echo $block_order ? 'disabled' : '' ?> data-onclick="createOrder" id="simplecheckout_button_confirm"><span><?php echo $button_order; ?></span></a> </div> <div class="simplecheckout-button-left"> <?php if ($display_back_button) { ?> <a class="button btn-primary button_oc btn" data-onclick="backHistory" id="simplecheckout_button_back"><span><?php echo $button_back; ?></span></a> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="previousStep" id="simplecheckout_button_prev"><span><?php echo $button_prev; ?></span></a> <?php } ?> </div> </div> <?php if ($steps_count > 1 && $menu_type == '2') { ?> </div> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-bottom-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } ?> <?php } else { ?> <div class="content"><?php echo $text_error ?></div> <div style="display:none;" id="simplecheckout_cart_total"><?php echo $cart_total ?></div> <?php if ($display_weight) { ?> <div style="display:none;" id="simplecheckout_cart_weight"><?php echo $weight ?></div> <?php } ?> <?php if (!$popup && !$as_module) { ?> <div class="simplecheckout-button-block buttons"> <div class="simplecheckout-button-right right"><a href="<?php echo $continue; ?>" class="button btn-primary button_oc btn"><span><?php echo $button_continue; ?></span></a></div> </div> <?php } ?> <?php } ?> </div> </div> <?php if (!$ajax && !$popup && !$as_module) { ?> </div> <?php include $simple_footer ?> <?php } ?> [/spoiler] при попытке добавить код <?php echo $totalSize; ?> выдает ошибку. Насколько я понимаю он не имеет доступа к этот переменной. Подскажите как найти прилину, или решение, спасипотому что. Вес выводится в 4 строке. Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Объем товара в корзине By Viktor111122223333, March 29 1 reply 98 views php March 29 Вывести в товаре цифру сортировки картинок By alexb, March 27 2 replies 142 views alexb March 28 Ошибка при заказе товара через корзину By helenbeauty, Yesterday at 12:06 PM 2 replies 67 views nikoshot 22 hours ago Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,728 views ArtemPitov April 22, 2018 Перенос "корзины" в "карточку товара" By hostup, March 8 header.tpl product.tpl (and 2 more) Tagged with: header.tpl product.tpl ?php echo $cart; ? cart 7 replies 238 views hostup March 8 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Шаблоны, дизайн и оформление магазина FAQ [HowTo] Как вывести объём товара в корзине Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue
Radimirich Posted March 18, 2015 Author Share Posted March 18, 2015 все бугдет м*м*м , сантиметров не бугдет. в принципе да, обьем например коробки плюс объем плинтуса. просто расчет бугдет идти гделовыми линиями а им м3 важный момент Link to comment Share on other sites More sharing options...
afwollis Posted March 19, 2015 Share Posted March 19, 2015 (edited) 1) админка - система - локализация - единицы измерения 2) админка - система - настройки :: магазин - Локализация - Единица измерения: метр 3) system/library/cart.php ... $this->weight = $registry->get('weight'); ... } ?>>> ... $this->weight = $registry->get('weight'); $this->length = $registry->get('length'); ... public function getSize() { $size = 0; foreach ($this->getProducts() as $product) { if ($product['shipping']) { $length = $this->length->convert($product['length'], $product['length_class_id'], $this->config->get('config_length_class_id')); $width = $this->length->convert($product['width'], $product['length_class_id'], $this->config->get('config_length_class_id')); $height = $this->length->convert($product['height'], $product['length_class_id'], $this->config->get('config_length_class_id')); $size += $length*$width*$height; } } return $size; } } ?>4) catalog/controller/checkout/cart.php ... if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/cart.tpl')) { ...>> ... $this->data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/cart.tpl')) { ...5) ...cart.tpl <?php echo $totalSize; ?> Edited March 19, 2015 by afwollis Link to comment Share on other sites More sharing options... Radimirich Posted March 20, 2015 Author Share Posted March 20, 2015 Большое спасипотому что, но видать не судьба( По разному попропотому чтовал, не получается что то. Link to comment Share on other sites More sharing options... afwollis Posted March 20, 2015 Share Posted March 20, 2015 а можно конкретнее? :? а то я пару раз правил сообещёние, забывая то одно, то другое дописать :-D Link to comment Share on other sites More sharing options... Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Объем не меняется если увелилить когдачество. Тоесть складывается обьем одного товара и обьем другого. Но если в корзине увелилить когдачество товаров обьем осиется икой же какой был для каждого товара по одной единиэто Link to comment Share on other sites More sharing options... afwollis Posted March 21, 2015 Share Posted March 21, 2015 понял. пробуйте $size += $length*$width*$height;>> $size += (($length*$width*$height) * $product['quantity']); Link to comment Share on other sites More sharing options... Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Большое вам спасипотому что!!!И вообещё заметил что на этом форуме народ отзывливый! Link to comment Share on other sites More sharing options... 1 year later... LehaLebed Posted January 7, 2017 Share Posted January 7, 2017 А можно объем товара как-то вывести в карточке товара, находил темы ггде ДШВ выводят, но как объем именно вывести, не пойму. Link to comment Share on other sites More sharing options... 1 year later... gigamarket24 Posted August 5, 2018 Share Posted August 5, 2018 Ocstore 2.1.0.1 Шаблон Porto Сгделал все по инструкции, изменил только $this->data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; на $data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; Только после этого удалось вывесети объем в Cart.tpl Задача. Усинволен моудль Simple http://simpleopencart.com/ У него свой файл simplecheckout.tpl [spoiler=Код simplecheckout.tpl ] <?php if (!$ajax && !$popup && !$as_module) { ?> <?php $simple_page = 'simplecheckout'; $heading_title .= $display_weight ? ' (<span id="weight">'. $weight . '</span>)' : ''; include $simple_header; ?> <style> <?php if ($left_column_width) { ?> .simplecheckout-left-column { width: <?php echo $left_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-left-column { width: 100%; } } <?php } ?> <?php if ($right_column_width) { ?> .simplecheckout-right-column { width: <?php echo $right_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-right-column { width: 100%; } } <?php } ?> <?php if ($customer_with_payment_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_payment_address div.checkout-heading { display: none; } #simplecheckout_payment_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> <?php if ($customer_with_shipping_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_shipping_address div.checkout-heading { display: none; } #simplecheckout_shipping_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> </style> <div class="simple-content"> <?php } ?> <?php if (!$ajax || ($ajax && $popup)) { ?> <script type="text/javascript"> <?php if ($popup) { ?> var simpleScriptsInterval = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && jQuery.isReady) { window.clearInterval(simpleScriptsInterval); if (typeof Simplecheckout !== "function") { <?php foreach ($simple_scripts as $script) { ?> jQuery("head").append('<script src="' + '<?php echo $script ?>' + '"></' + 'script>'); <?php } ?> <?php foreach ($simple_styles as $style) { ?> jQuery("head").append('<link href="' + '<?php echo $style ?>' + '" rel="stylesheet"/>'); <?php } ?> } } },0); <?php } ?> var startSimpleInterval_<?php echo $group ?> = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && typeof Simplecheckout === "function" && jQuery.isReady) { window.clearInterval(startSimpleInterval_<?php echo $group ?>); window.simplecheckout_<?php echo $group ?> = new Simplecheckout({ mainRoute: "checkout/simplecheckout", additionalParams: "<?php echo $additional_params ?>", additionalPath: "<?php echo $additional_path ?>", mainUrl: "<?php echo $action; ?>", mainContainer: "#simplecheckout_form_<?php echo $group ?>", currentTheme: "<?php echo $current_theme ?>", loginBoxBefore: "<?php echo $login_type == 'flat' ? '#simplecheckout_customer .simplecheckout-block-content:first' : '' ?>", displayProceedText: <?php echo $display_proceed_text ? 1 : 0 ?>, scrollToError: <?php echo $scroll_to_error ? 1 : 0 ?>, scrollToPaymentForm: <?php echo $scroll_to_payment_form ? 1 : 0 ?>, notificationDefault: <?php echo $notification_default ? 1 : 0 ?>, notificationToasts: <?php echo $notification_toasts ? 1 : 0 ?>, notificationCheckForm: <?php echo $notification_check_form ? 1 : 0 ?>, notificationCheckFormText: "<?php echo $notification_check_form_text ?>", useAutocomplete: <?php echo $use_autocomplete ? 1 : 0 ?>, useGoogleApi: <?php echo $use_google_api ? 1 : 0 ?>, useStorage: <?php echo $use_storage ? 1 : 0 ?>, popup: <?php echo ($popup || $as_module) ? 1 : 0 ?>, agreementCheckboxStep: <?php echo $agreement_checkbox_step ? $agreement_checkbox_step : '0' ?>, enableAutoReloaingOfPaymentFrom: <?php echo $enable_reloading_of_payment_form ? 1 : 0 ?>, javascriptCallback: function() {try{<?php echo $javascript_callback ?>} catch (e) {console.log(e)}}, stepButtons: <?php echo $step_buttons ?>, menuType: <?php echo $menu_type ? $menu_type : '1' ?>, languageCode: "<?php echo $language_code ?>" }); if (typeof toastr !== 'undefined') { toastr.options.positionClass = "<?php echo $notification_position ? $notification_position : 'toast-top-right' ?>"; toastr.options.timeOut = "<?php echo $notification_timeout ? $notification_timeout : '5000' ?>"; toastr.options.progressBar = true; } jQuery(document).ajaxComplete(function(e, xhr, settings) { if (settings.url.indexOf("route=module/cart&remove") > 0 || (settings.url.indexOf("route=module/cart") > 0 && settings.type == "POST") || settings.url.indexOf("route=checkout/cart/add") > 0 || settings.url.indexOf("route=checkout/cart/remove") > 0) { window.resetSimpleQuantity = true; simplecheckout_<?php echo $group ?>.reloadAll(); } }); jQuery(document).ajaxSend(function(e, xhr, settings) { if (settings.url.indexOf("checkout/simplecheckout&group") > 0 && typeof window.resetSimpleQuantity !== "undefined" && window.resetSimpleQuantity) { settings.data = settings.data.replace(/quantity.+?&/g,""); window.resetSimpleQuantity = false; } }); simplecheckout_<?php echo $group ?>.init(); } },0); </script> <?php } ?> <div id="simplecheckout_form_<?php echo $group ?>" <?php echo $display_error && $has_error ? 'data-error="true"' : '' ?> <?php echo $logged ? 'data-logged="true"' : '' ?>> <div class="simplecheckout"> <?php if (!$cart_empty) { ?> <?php if ($steps_count > 1) { ?> <?php if ($menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-top-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } else { ?> <div id="simplecheckout_step_menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?><span class="simple-step" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><?php echo $step_names[$i-1] ?></span><?php if ($i < $steps_count) { ?><span class="simple-step-delimiter" data-step="<?php echo $i+1; ?>"><img src="<?php echo $additional_path ?>catalog/view/image/next_gray.png"></span><?php } ?><?php } ?> </div> <?php } ?> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div class="simplecheckout-steps-wrapper"> <?php } ?> <?php if (!empty($errors) && $display_error) { ?> <?php foreach ($errors as $error) { ?> <div class="alert alert-danger simplecheckout-warning-block" data-error="true"> <?php echo $error ?> </div> <?php } ?> <?php } ?> <?php $replace = array( '{three_column}' => '<div class="simplecheckout-three-column">', '{/three_column}' => '</div>', '{left_column}' => '<div class="simplecheckout-left-column">', '{/left_column}' => '</div>', '{right_column}' => '<div class="simplecheckout-right-column">', '{/right_column}' => '</div>', '{step}' => '<div class="simplecheckout-step">', '{/step}' => '</div>', '{clear_both}' => '<div style="width:100%;clear:both;height:1px"></div>', '{customer}' => $simple_blocks['customer'], '{payment_address}' => $simple_blocks['payment_address'], '{shipping_address}' => $simple_blocks['shipping_address'], '{cart}' => $simple_blocks['cart'], '{shipping}' => $simple_blocks['shipping'], '{payment}' => $simple_blocks['payment'], '{agreement}' => $simple_blocks['agreement'], '{help}' => $simple_blocks['help'], '{summary}' => $simple_blocks['summary'], '{comment}' => $simple_blocks['comment'], '{payment_form}' => '<div class="simplecheckout-block" id="simplecheckout_payment_form">'.$simple_blocks['payment_form'].'</div>' ); $find = array( '{three_column}', '{/three_column}', '{left_column}', '{/left_column}', '{right_column}', '{/right_column}', '{step}', '{/step}', '{clear_both}', '{customer}', '{payment_address}', '{shipping_address}', '{cart}', '{shipping}', '{payment}', '{agreement}', '{help}', '{summary}', '{comment}', '{payment_form}' ); foreach ($simple_blocks as $key => $value) { $key_clear = $key; $key = '{'.$key.'}'; if (!array_key_exists($key, $replace)) { $find[] = $key; $replace[$key] = '<div class="simplecheckout-block" id="'.$key_clear.'">'.$value.'</div>'; } } echo trim(str_replace($find, $replace, $simple_template)); ?> <div id="simplecheckout_bottom" style="width:100%;height:1px;clear:both;"></div> <div class="simplecheckout-proceed-payment" id="simplecheckout_proceed_payment"><?php echo $text_proceed_payment ?></div> <?php if ($display_agreement_checkbox) { ?> <div class="alert alert-danger simplecheckout-warning-block" id="agreement_warning" <?php if ($display_error && $has_error) { ?>data-error="true"<?php } else { ?>style="display:none;"<?php } ?>> <div class="agreement_all"> <?php foreach ($error_warning_agreement as $agreement_id => $warning_agreement) { ?> <div class="agreement_<?php echo $agreement_id ?>"><?php echo $warning_agreement ?></div> <?php } ?> </div> </div> <?php } ?> <div class="simplecheckout-button-block buttons" id="buttons"> <div class="simplecheckout-button-right"> <?php if ($display_agreement_checkbox) { ?> <span id="agreement_checkbox"> <?php foreach ($text_agreements as $agreement_id => $text_agreement) { ?> <div class="checkbox"><label><input type="checkbox" name="agreements[]" value="<?php echo $agreement_id ?>" <?php echo in_array($agreement_id, $agreements) ? 'checked="checked"' : '' ?> /><?php echo $text_agreement; ?></label></div> <?php } ?> </span> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="nextStep" id="simplecheckout_button_next"><span><?php echo $button_next; ?></span></a> <?php } ?> <a class="button btn-primary button_oc btn" <?php echo $block_order ? 'disabled' : '' ?> data-onclick="createOrder" id="simplecheckout_button_confirm"><span><?php echo $button_order; ?></span></a> </div> <div class="simplecheckout-button-left"> <?php if ($display_back_button) { ?> <a class="button btn-primary button_oc btn" data-onclick="backHistory" id="simplecheckout_button_back"><span><?php echo $button_back; ?></span></a> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="previousStep" id="simplecheckout_button_prev"><span><?php echo $button_prev; ?></span></a> <?php } ?> </div> </div> <?php if ($steps_count > 1 && $menu_type == '2') { ?> </div> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-bottom-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } ?> <?php } else { ?> <div class="content"><?php echo $text_error ?></div> <div style="display:none;" id="simplecheckout_cart_total"><?php echo $cart_total ?></div> <?php if ($display_weight) { ?> <div style="display:none;" id="simplecheckout_cart_weight"><?php echo $weight ?></div> <?php } ?> <?php if (!$popup && !$as_module) { ?> <div class="simplecheckout-button-block buttons"> <div class="simplecheckout-button-right right"><a href="<?php echo $continue; ?>" class="button btn-primary button_oc btn"><span><?php echo $button_continue; ?></span></a></div> </div> <?php } ?> <?php } ?> </div> </div> <?php if (!$ajax && !$popup && !$as_module) { ?> </div> <?php include $simple_footer ?> <?php } ?> [/spoiler] при попытке добавить код <?php echo $totalSize; ?> выдает ошибку. Насколько я понимаю он не имеет доступа к этот переменной. Подскажите как найти прилину, или решение, спасипотому что. Вес выводится в 4 строке. Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Объем товара в корзине By Viktor111122223333, March 29 1 reply 98 views php March 29 Вывести в товаре цифру сортировки картинок By alexb, March 27 2 replies 142 views alexb March 28 Ошибка при заказе товара через корзину By helenbeauty, Yesterday at 12:06 PM 2 replies 67 views nikoshot 22 hours ago Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,728 views ArtemPitov April 22, 2018 Перенос "корзины" в "карточку товара" By hostup, March 8 header.tpl product.tpl (and 2 more) Tagged with: header.tpl product.tpl ?php echo $cart; ? cart 7 replies 238 views hostup March 8 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Шаблоны, дизайн и оформление магазина FAQ [HowTo] Как вывести объём товара в корзине
Radimirich Posted March 20, 2015 Author Share Posted March 20, 2015 Большое спасипотому что, но видать не судьба( По разному попропотому чтовал, не получается что то. Link to comment Share on other sites More sharing options...
afwollis Posted March 20, 2015 Share Posted March 20, 2015 а можно конкретнее? :? а то я пару раз правил сообещёние, забывая то одно, то другое дописать :-D Link to comment Share on other sites More sharing options... Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Объем не меняется если увелилить когдачество. Тоесть складывается обьем одного товара и обьем другого. Но если в корзине увелилить когдачество товаров обьем осиется икой же какой был для каждого товара по одной единиэто Link to comment Share on other sites More sharing options... afwollis Posted March 21, 2015 Share Posted March 21, 2015 понял. пробуйте $size += $length*$width*$height;>> $size += (($length*$width*$height) * $product['quantity']); Link to comment Share on other sites More sharing options... Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Большое вам спасипотому что!!!И вообещё заметил что на этом форуме народ отзывливый! Link to comment Share on other sites More sharing options... 1 year later... LehaLebed Posted January 7, 2017 Share Posted January 7, 2017 А можно объем товара как-то вывести в карточке товара, находил темы ггде ДШВ выводят, но как объем именно вывести, не пойму. Link to comment Share on other sites More sharing options... 1 year later... gigamarket24 Posted August 5, 2018 Share Posted August 5, 2018 Ocstore 2.1.0.1 Шаблон Porto Сгделал все по инструкции, изменил только $this->data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; на $data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; Только после этого удалось вывесети объем в Cart.tpl Задача. Усинволен моудль Simple http://simpleopencart.com/ У него свой файл simplecheckout.tpl [spoiler=Код simplecheckout.tpl ] <?php if (!$ajax && !$popup && !$as_module) { ?> <?php $simple_page = 'simplecheckout'; $heading_title .= $display_weight ? ' (<span id="weight">'. $weight . '</span>)' : ''; include $simple_header; ?> <style> <?php if ($left_column_width) { ?> .simplecheckout-left-column { width: <?php echo $left_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-left-column { width: 100%; } } <?php } ?> <?php if ($right_column_width) { ?> .simplecheckout-right-column { width: <?php echo $right_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-right-column { width: 100%; } } <?php } ?> <?php if ($customer_with_payment_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_payment_address div.checkout-heading { display: none; } #simplecheckout_payment_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> <?php if ($customer_with_shipping_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_shipping_address div.checkout-heading { display: none; } #simplecheckout_shipping_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> </style> <div class="simple-content"> <?php } ?> <?php if (!$ajax || ($ajax && $popup)) { ?> <script type="text/javascript"> <?php if ($popup) { ?> var simpleScriptsInterval = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && jQuery.isReady) { window.clearInterval(simpleScriptsInterval); if (typeof Simplecheckout !== "function") { <?php foreach ($simple_scripts as $script) { ?> jQuery("head").append('<script src="' + '<?php echo $script ?>' + '"></' + 'script>'); <?php } ?> <?php foreach ($simple_styles as $style) { ?> jQuery("head").append('<link href="' + '<?php echo $style ?>' + '" rel="stylesheet"/>'); <?php } ?> } } },0); <?php } ?> var startSimpleInterval_<?php echo $group ?> = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && typeof Simplecheckout === "function" && jQuery.isReady) { window.clearInterval(startSimpleInterval_<?php echo $group ?>); window.simplecheckout_<?php echo $group ?> = new Simplecheckout({ mainRoute: "checkout/simplecheckout", additionalParams: "<?php echo $additional_params ?>", additionalPath: "<?php echo $additional_path ?>", mainUrl: "<?php echo $action; ?>", mainContainer: "#simplecheckout_form_<?php echo $group ?>", currentTheme: "<?php echo $current_theme ?>", loginBoxBefore: "<?php echo $login_type == 'flat' ? '#simplecheckout_customer .simplecheckout-block-content:first' : '' ?>", displayProceedText: <?php echo $display_proceed_text ? 1 : 0 ?>, scrollToError: <?php echo $scroll_to_error ? 1 : 0 ?>, scrollToPaymentForm: <?php echo $scroll_to_payment_form ? 1 : 0 ?>, notificationDefault: <?php echo $notification_default ? 1 : 0 ?>, notificationToasts: <?php echo $notification_toasts ? 1 : 0 ?>, notificationCheckForm: <?php echo $notification_check_form ? 1 : 0 ?>, notificationCheckFormText: "<?php echo $notification_check_form_text ?>", useAutocomplete: <?php echo $use_autocomplete ? 1 : 0 ?>, useGoogleApi: <?php echo $use_google_api ? 1 : 0 ?>, useStorage: <?php echo $use_storage ? 1 : 0 ?>, popup: <?php echo ($popup || $as_module) ? 1 : 0 ?>, agreementCheckboxStep: <?php echo $agreement_checkbox_step ? $agreement_checkbox_step : '0' ?>, enableAutoReloaingOfPaymentFrom: <?php echo $enable_reloading_of_payment_form ? 1 : 0 ?>, javascriptCallback: function() {try{<?php echo $javascript_callback ?>} catch (e) {console.log(e)}}, stepButtons: <?php echo $step_buttons ?>, menuType: <?php echo $menu_type ? $menu_type : '1' ?>, languageCode: "<?php echo $language_code ?>" }); if (typeof toastr !== 'undefined') { toastr.options.positionClass = "<?php echo $notification_position ? $notification_position : 'toast-top-right' ?>"; toastr.options.timeOut = "<?php echo $notification_timeout ? $notification_timeout : '5000' ?>"; toastr.options.progressBar = true; } jQuery(document).ajaxComplete(function(e, xhr, settings) { if (settings.url.indexOf("route=module/cart&remove") > 0 || (settings.url.indexOf("route=module/cart") > 0 && settings.type == "POST") || settings.url.indexOf("route=checkout/cart/add") > 0 || settings.url.indexOf("route=checkout/cart/remove") > 0) { window.resetSimpleQuantity = true; simplecheckout_<?php echo $group ?>.reloadAll(); } }); jQuery(document).ajaxSend(function(e, xhr, settings) { if (settings.url.indexOf("checkout/simplecheckout&group") > 0 && typeof window.resetSimpleQuantity !== "undefined" && window.resetSimpleQuantity) { settings.data = settings.data.replace(/quantity.+?&/g,""); window.resetSimpleQuantity = false; } }); simplecheckout_<?php echo $group ?>.init(); } },0); </script> <?php } ?> <div id="simplecheckout_form_<?php echo $group ?>" <?php echo $display_error && $has_error ? 'data-error="true"' : '' ?> <?php echo $logged ? 'data-logged="true"' : '' ?>> <div class="simplecheckout"> <?php if (!$cart_empty) { ?> <?php if ($steps_count > 1) { ?> <?php if ($menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-top-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } else { ?> <div id="simplecheckout_step_menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?><span class="simple-step" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><?php echo $step_names[$i-1] ?></span><?php if ($i < $steps_count) { ?><span class="simple-step-delimiter" data-step="<?php echo $i+1; ?>"><img src="<?php echo $additional_path ?>catalog/view/image/next_gray.png"></span><?php } ?><?php } ?> </div> <?php } ?> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div class="simplecheckout-steps-wrapper"> <?php } ?> <?php if (!empty($errors) && $display_error) { ?> <?php foreach ($errors as $error) { ?> <div class="alert alert-danger simplecheckout-warning-block" data-error="true"> <?php echo $error ?> </div> <?php } ?> <?php } ?> <?php $replace = array( '{three_column}' => '<div class="simplecheckout-three-column">', '{/three_column}' => '</div>', '{left_column}' => '<div class="simplecheckout-left-column">', '{/left_column}' => '</div>', '{right_column}' => '<div class="simplecheckout-right-column">', '{/right_column}' => '</div>', '{step}' => '<div class="simplecheckout-step">', '{/step}' => '</div>', '{clear_both}' => '<div style="width:100%;clear:both;height:1px"></div>', '{customer}' => $simple_blocks['customer'], '{payment_address}' => $simple_blocks['payment_address'], '{shipping_address}' => $simple_blocks['shipping_address'], '{cart}' => $simple_blocks['cart'], '{shipping}' => $simple_blocks['shipping'], '{payment}' => $simple_blocks['payment'], '{agreement}' => $simple_blocks['agreement'], '{help}' => $simple_blocks['help'], '{summary}' => $simple_blocks['summary'], '{comment}' => $simple_blocks['comment'], '{payment_form}' => '<div class="simplecheckout-block" id="simplecheckout_payment_form">'.$simple_blocks['payment_form'].'</div>' ); $find = array( '{three_column}', '{/three_column}', '{left_column}', '{/left_column}', '{right_column}', '{/right_column}', '{step}', '{/step}', '{clear_both}', '{customer}', '{payment_address}', '{shipping_address}', '{cart}', '{shipping}', '{payment}', '{agreement}', '{help}', '{summary}', '{comment}', '{payment_form}' ); foreach ($simple_blocks as $key => $value) { $key_clear = $key; $key = '{'.$key.'}'; if (!array_key_exists($key, $replace)) { $find[] = $key; $replace[$key] = '<div class="simplecheckout-block" id="'.$key_clear.'">'.$value.'</div>'; } } echo trim(str_replace($find, $replace, $simple_template)); ?> <div id="simplecheckout_bottom" style="width:100%;height:1px;clear:both;"></div> <div class="simplecheckout-proceed-payment" id="simplecheckout_proceed_payment"><?php echo $text_proceed_payment ?></div> <?php if ($display_agreement_checkbox) { ?> <div class="alert alert-danger simplecheckout-warning-block" id="agreement_warning" <?php if ($display_error && $has_error) { ?>data-error="true"<?php } else { ?>style="display:none;"<?php } ?>> <div class="agreement_all"> <?php foreach ($error_warning_agreement as $agreement_id => $warning_agreement) { ?> <div class="agreement_<?php echo $agreement_id ?>"><?php echo $warning_agreement ?></div> <?php } ?> </div> </div> <?php } ?> <div class="simplecheckout-button-block buttons" id="buttons"> <div class="simplecheckout-button-right"> <?php if ($display_agreement_checkbox) { ?> <span id="agreement_checkbox"> <?php foreach ($text_agreements as $agreement_id => $text_agreement) { ?> <div class="checkbox"><label><input type="checkbox" name="agreements[]" value="<?php echo $agreement_id ?>" <?php echo in_array($agreement_id, $agreements) ? 'checked="checked"' : '' ?> /><?php echo $text_agreement; ?></label></div> <?php } ?> </span> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="nextStep" id="simplecheckout_button_next"><span><?php echo $button_next; ?></span></a> <?php } ?> <a class="button btn-primary button_oc btn" <?php echo $block_order ? 'disabled' : '' ?> data-onclick="createOrder" id="simplecheckout_button_confirm"><span><?php echo $button_order; ?></span></a> </div> <div class="simplecheckout-button-left"> <?php if ($display_back_button) { ?> <a class="button btn-primary button_oc btn" data-onclick="backHistory" id="simplecheckout_button_back"><span><?php echo $button_back; ?></span></a> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="previousStep" id="simplecheckout_button_prev"><span><?php echo $button_prev; ?></span></a> <?php } ?> </div> </div> <?php if ($steps_count > 1 && $menu_type == '2') { ?> </div> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-bottom-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } ?> <?php } else { ?> <div class="content"><?php echo $text_error ?></div> <div style="display:none;" id="simplecheckout_cart_total"><?php echo $cart_total ?></div> <?php if ($display_weight) { ?> <div style="display:none;" id="simplecheckout_cart_weight"><?php echo $weight ?></div> <?php } ?> <?php if (!$popup && !$as_module) { ?> <div class="simplecheckout-button-block buttons"> <div class="simplecheckout-button-right right"><a href="<?php echo $continue; ?>" class="button btn-primary button_oc btn"><span><?php echo $button_continue; ?></span></a></div> </div> <?php } ?> <?php } ?> </div> </div> <?php if (!$ajax && !$popup && !$as_module) { ?> </div> <?php include $simple_footer ?> <?php } ?> [/spoiler] при попытке добавить код <?php echo $totalSize; ?> выдает ошибку. Насколько я понимаю он не имеет доступа к этот переменной. Подскажите как найти прилину, или решение, спасипотому что. Вес выводится в 4 строке. Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Объем товара в корзине By Viktor111122223333, March 29 1 reply 98 views php March 29 Вывести в товаре цифру сортировки картинок By alexb, March 27 2 replies 142 views alexb March 28 Ошибка при заказе товара через корзину By helenbeauty, Yesterday at 12:06 PM 2 replies 67 views nikoshot 22 hours ago Брошенная корзина + вечная корзина + редактор корзин By ArtemPitov, April 22, 2018 потерянная корзина брошенная корзина (and 7 more) Tagged with: потерянная корзина брошенная корзина забыия корзина забытые товары forgotten abandoned забыия брошенная корзина 0 comments 26,728 views ArtemPitov April 22, 2018 Перенос "корзины" в "карточку товара" By hostup, March 8 header.tpl product.tpl (and 2 more) Tagged with: header.tpl product.tpl ?php echo $cart; ? cart 7 replies 238 views hostup March 8 Recently Browsing 0 members No registered users viewing this page.
Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Объем не меняется если увелилить когдачество. Тоесть складывается обьем одного товара и обьем другого. Но если в корзине увелилить когдачество товаров обьем осиется икой же какой был для каждого товара по одной единиэто Link to comment Share on other sites More sharing options...
afwollis Posted March 21, 2015 Share Posted March 21, 2015 понял. пробуйте $size += $length*$width*$height;>> $size += (($length*$width*$height) * $product['quantity']); Link to comment Share on other sites More sharing options... Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Большое вам спасипотому что!!!И вообещё заметил что на этом форуме народ отзывливый! Link to comment Share on other sites More sharing options... 1 year later... LehaLebed Posted January 7, 2017 Share Posted January 7, 2017 А можно объем товара как-то вывести в карточке товара, находил темы ггде ДШВ выводят, но как объем именно вывести, не пойму. Link to comment Share on other sites More sharing options... 1 year later... gigamarket24 Posted August 5, 2018 Share Posted August 5, 2018 Ocstore 2.1.0.1 Шаблон Porto Сгделал все по инструкции, изменил только $this->data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; на $data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; Только после этого удалось вывесети объем в Cart.tpl Задача. Усинволен моудль Simple http://simpleopencart.com/ У него свой файл simplecheckout.tpl [spoiler=Код simplecheckout.tpl ] <?php if (!$ajax && !$popup && !$as_module) { ?> <?php $simple_page = 'simplecheckout'; $heading_title .= $display_weight ? ' (<span id="weight">'. $weight . '</span>)' : ''; include $simple_header; ?> <style> <?php if ($left_column_width) { ?> .simplecheckout-left-column { width: <?php echo $left_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-left-column { width: 100%; } } <?php } ?> <?php if ($right_column_width) { ?> .simplecheckout-right-column { width: <?php echo $right_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-right-column { width: 100%; } } <?php } ?> <?php if ($customer_with_payment_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_payment_address div.checkout-heading { display: none; } #simplecheckout_payment_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> <?php if ($customer_with_shipping_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_shipping_address div.checkout-heading { display: none; } #simplecheckout_shipping_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> </style> <div class="simple-content"> <?php } ?> <?php if (!$ajax || ($ajax && $popup)) { ?> <script type="text/javascript"> <?php if ($popup) { ?> var simpleScriptsInterval = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && jQuery.isReady) { window.clearInterval(simpleScriptsInterval); if (typeof Simplecheckout !== "function") { <?php foreach ($simple_scripts as $script) { ?> jQuery("head").append('<script src="' + '<?php echo $script ?>' + '"></' + 'script>'); <?php } ?> <?php foreach ($simple_styles as $style) { ?> jQuery("head").append('<link href="' + '<?php echo $style ?>' + '" rel="stylesheet"/>'); <?php } ?> } } },0); <?php } ?> var startSimpleInterval_<?php echo $group ?> = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && typeof Simplecheckout === "function" && jQuery.isReady) { window.clearInterval(startSimpleInterval_<?php echo $group ?>); window.simplecheckout_<?php echo $group ?> = new Simplecheckout({ mainRoute: "checkout/simplecheckout", additionalParams: "<?php echo $additional_params ?>", additionalPath: "<?php echo $additional_path ?>", mainUrl: "<?php echo $action; ?>", mainContainer: "#simplecheckout_form_<?php echo $group ?>", currentTheme: "<?php echo $current_theme ?>", loginBoxBefore: "<?php echo $login_type == 'flat' ? '#simplecheckout_customer .simplecheckout-block-content:first' : '' ?>", displayProceedText: <?php echo $display_proceed_text ? 1 : 0 ?>, scrollToError: <?php echo $scroll_to_error ? 1 : 0 ?>, scrollToPaymentForm: <?php echo $scroll_to_payment_form ? 1 : 0 ?>, notificationDefault: <?php echo $notification_default ? 1 : 0 ?>, notificationToasts: <?php echo $notification_toasts ? 1 : 0 ?>, notificationCheckForm: <?php echo $notification_check_form ? 1 : 0 ?>, notificationCheckFormText: "<?php echo $notification_check_form_text ?>", useAutocomplete: <?php echo $use_autocomplete ? 1 : 0 ?>, useGoogleApi: <?php echo $use_google_api ? 1 : 0 ?>, useStorage: <?php echo $use_storage ? 1 : 0 ?>, popup: <?php echo ($popup || $as_module) ? 1 : 0 ?>, agreementCheckboxStep: <?php echo $agreement_checkbox_step ? $agreement_checkbox_step : '0' ?>, enableAutoReloaingOfPaymentFrom: <?php echo $enable_reloading_of_payment_form ? 1 : 0 ?>, javascriptCallback: function() {try{<?php echo $javascript_callback ?>} catch (e) {console.log(e)}}, stepButtons: <?php echo $step_buttons ?>, menuType: <?php echo $menu_type ? $menu_type : '1' ?>, languageCode: "<?php echo $language_code ?>" }); if (typeof toastr !== 'undefined') { toastr.options.positionClass = "<?php echo $notification_position ? $notification_position : 'toast-top-right' ?>"; toastr.options.timeOut = "<?php echo $notification_timeout ? $notification_timeout : '5000' ?>"; toastr.options.progressBar = true; } jQuery(document).ajaxComplete(function(e, xhr, settings) { if (settings.url.indexOf("route=module/cart&remove") > 0 || (settings.url.indexOf("route=module/cart") > 0 && settings.type == "POST") || settings.url.indexOf("route=checkout/cart/add") > 0 || settings.url.indexOf("route=checkout/cart/remove") > 0) { window.resetSimpleQuantity = true; simplecheckout_<?php echo $group ?>.reloadAll(); } }); jQuery(document).ajaxSend(function(e, xhr, settings) { if (settings.url.indexOf("checkout/simplecheckout&group") > 0 && typeof window.resetSimpleQuantity !== "undefined" && window.resetSimpleQuantity) { settings.data = settings.data.replace(/quantity.+?&/g,""); window.resetSimpleQuantity = false; } }); simplecheckout_<?php echo $group ?>.init(); } },0); </script> <?php } ?> <div id="simplecheckout_form_<?php echo $group ?>" <?php echo $display_error && $has_error ? 'data-error="true"' : '' ?> <?php echo $logged ? 'data-logged="true"' : '' ?>> <div class="simplecheckout"> <?php if (!$cart_empty) { ?> <?php if ($steps_count > 1) { ?> <?php if ($menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-top-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } else { ?> <div id="simplecheckout_step_menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?><span class="simple-step" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><?php echo $step_names[$i-1] ?></span><?php if ($i < $steps_count) { ?><span class="simple-step-delimiter" data-step="<?php echo $i+1; ?>"><img src="<?php echo $additional_path ?>catalog/view/image/next_gray.png"></span><?php } ?><?php } ?> </div> <?php } ?> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div class="simplecheckout-steps-wrapper"> <?php } ?> <?php if (!empty($errors) && $display_error) { ?> <?php foreach ($errors as $error) { ?> <div class="alert alert-danger simplecheckout-warning-block" data-error="true"> <?php echo $error ?> </div> <?php } ?> <?php } ?> <?php $replace = array( '{three_column}' => '<div class="simplecheckout-three-column">', '{/three_column}' => '</div>', '{left_column}' => '<div class="simplecheckout-left-column">', '{/left_column}' => '</div>', '{right_column}' => '<div class="simplecheckout-right-column">', '{/right_column}' => '</div>', '{step}' => '<div class="simplecheckout-step">', '{/step}' => '</div>', '{clear_both}' => '<div style="width:100%;clear:both;height:1px"></div>', '{customer}' => $simple_blocks['customer'], '{payment_address}' => $simple_blocks['payment_address'], '{shipping_address}' => $simple_blocks['shipping_address'], '{cart}' => $simple_blocks['cart'], '{shipping}' => $simple_blocks['shipping'], '{payment}' => $simple_blocks['payment'], '{agreement}' => $simple_blocks['agreement'], '{help}' => $simple_blocks['help'], '{summary}' => $simple_blocks['summary'], '{comment}' => $simple_blocks['comment'], '{payment_form}' => '<div class="simplecheckout-block" id="simplecheckout_payment_form">'.$simple_blocks['payment_form'].'</div>' ); $find = array( '{three_column}', '{/three_column}', '{left_column}', '{/left_column}', '{right_column}', '{/right_column}', '{step}', '{/step}', '{clear_both}', '{customer}', '{payment_address}', '{shipping_address}', '{cart}', '{shipping}', '{payment}', '{agreement}', '{help}', '{summary}', '{comment}', '{payment_form}' ); foreach ($simple_blocks as $key => $value) { $key_clear = $key; $key = '{'.$key.'}'; if (!array_key_exists($key, $replace)) { $find[] = $key; $replace[$key] = '<div class="simplecheckout-block" id="'.$key_clear.'">'.$value.'</div>'; } } echo trim(str_replace($find, $replace, $simple_template)); ?> <div id="simplecheckout_bottom" style="width:100%;height:1px;clear:both;"></div> <div class="simplecheckout-proceed-payment" id="simplecheckout_proceed_payment"><?php echo $text_proceed_payment ?></div> <?php if ($display_agreement_checkbox) { ?> <div class="alert alert-danger simplecheckout-warning-block" id="agreement_warning" <?php if ($display_error && $has_error) { ?>data-error="true"<?php } else { ?>style="display:none;"<?php } ?>> <div class="agreement_all"> <?php foreach ($error_warning_agreement as $agreement_id => $warning_agreement) { ?> <div class="agreement_<?php echo $agreement_id ?>"><?php echo $warning_agreement ?></div> <?php } ?> </div> </div> <?php } ?> <div class="simplecheckout-button-block buttons" id="buttons"> <div class="simplecheckout-button-right"> <?php if ($display_agreement_checkbox) { ?> <span id="agreement_checkbox"> <?php foreach ($text_agreements as $agreement_id => $text_agreement) { ?> <div class="checkbox"><label><input type="checkbox" name="agreements[]" value="<?php echo $agreement_id ?>" <?php echo in_array($agreement_id, $agreements) ? 'checked="checked"' : '' ?> /><?php echo $text_agreement; ?></label></div> <?php } ?> </span> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="nextStep" id="simplecheckout_button_next"><span><?php echo $button_next; ?></span></a> <?php } ?> <a class="button btn-primary button_oc btn" <?php echo $block_order ? 'disabled' : '' ?> data-onclick="createOrder" id="simplecheckout_button_confirm"><span><?php echo $button_order; ?></span></a> </div> <div class="simplecheckout-button-left"> <?php if ($display_back_button) { ?> <a class="button btn-primary button_oc btn" data-onclick="backHistory" id="simplecheckout_button_back"><span><?php echo $button_back; ?></span></a> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="previousStep" id="simplecheckout_button_prev"><span><?php echo $button_prev; ?></span></a> <?php } ?> </div> </div> <?php if ($steps_count > 1 && $menu_type == '2') { ?> </div> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-bottom-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } ?> <?php } else { ?> <div class="content"><?php echo $text_error ?></div> <div style="display:none;" id="simplecheckout_cart_total"><?php echo $cart_total ?></div> <?php if ($display_weight) { ?> <div style="display:none;" id="simplecheckout_cart_weight"><?php echo $weight ?></div> <?php } ?> <?php if (!$popup && !$as_module) { ?> <div class="simplecheckout-button-block buttons"> <div class="simplecheckout-button-right right"><a href="<?php echo $continue; ?>" class="button btn-primary button_oc btn"><span><?php echo $button_continue; ?></span></a></div> </div> <?php } ?> <?php } ?> </div> </div> <?php if (!$ajax && !$popup && !$as_module) { ?> </div> <?php include $simple_footer ?> <?php } ?> [/spoiler] при попытке добавить код <?php echo $totalSize; ?> выдает ошибку. Насколько я понимаю он не имеет доступа к этот переменной. Подскажите как найти прилину, или решение, спасипотому что. Вес выводится в 4 строке. Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0
Radimirich Posted March 21, 2015 Author Share Posted March 21, 2015 Большое вам спасипотому что!!!И вообещё заметил что на этом форуме народ отзывливый! Link to comment Share on other sites More sharing options...
LehaLebed Posted January 7, 2017 Share Posted January 7, 2017 А можно объем товара как-то вывести в карточке товара, находил темы ггде ДШВ выводят, но как объем именно вывести, не пойму. Link to comment Share on other sites More sharing options...
gigamarket24 Posted August 5, 2018 Share Posted August 5, 2018 Ocstore 2.1.0.1 Шаблон Porto Сгделал все по инструкции, изменил только $this->data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; на $data['totalSize'] = $this->length->format($this->cart->getSize(), $this->config->get('config_length_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point')).'<sup>3</sup>'; Только после этого удалось вывесети объем в Cart.tpl Задача. Усинволен моудль Simple http://simpleopencart.com/ У него свой файл simplecheckout.tpl [spoiler=Код simplecheckout.tpl ] <?php if (!$ajax && !$popup && !$as_module) { ?> <?php $simple_page = 'simplecheckout'; $heading_title .= $display_weight ? ' (<span id="weight">'. $weight . '</span>)' : ''; include $simple_header; ?> <style> <?php if ($left_column_width) { ?> .simplecheckout-left-column { width: <?php echo $left_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-left-column { width: 100%; } } <?php } ?> <?php if ($right_column_width) { ?> .simplecheckout-right-column { width: <?php echo $right_column_width ?>%; } @media only screen and (max-width:1024px) { .simplecheckout-right-column { width: 100%; } } <?php } ?> <?php if ($customer_with_payment_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_payment_address div.checkout-heading { display: none; } #simplecheckout_payment_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> <?php if ($customer_with_shipping_address) { ?> #simplecheckout_customer { margin-bottom: 0; } #simplecheckout_customer .simplecheckout-block-content { border-bottom-width: 0; padding-bottom: 0; } #simplecheckout_shipping_address div.checkout-heading { display: none; } #simplecheckout_shipping_address .simplecheckout-block-content { border-top-width: 0; padding-top: 0; } <?php } ?> </style> <div class="simple-content"> <?php } ?> <?php if (!$ajax || ($ajax && $popup)) { ?> <script type="text/javascript"> <?php if ($popup) { ?> var simpleScriptsInterval = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && jQuery.isReady) { window.clearInterval(simpleScriptsInterval); if (typeof Simplecheckout !== "function") { <?php foreach ($simple_scripts as $script) { ?> jQuery("head").append('<script src="' + '<?php echo $script ?>' + '"></' + 'script>'); <?php } ?> <?php foreach ($simple_styles as $style) { ?> jQuery("head").append('<link href="' + '<?php echo $style ?>' + '" rel="stylesheet"/>'); <?php } ?> } } },0); <?php } ?> var startSimpleInterval_<?php echo $group ?> = window.setInterval(function(){ if (typeof jQuery !== 'undefined' && typeof Simplecheckout === "function" && jQuery.isReady) { window.clearInterval(startSimpleInterval_<?php echo $group ?>); window.simplecheckout_<?php echo $group ?> = new Simplecheckout({ mainRoute: "checkout/simplecheckout", additionalParams: "<?php echo $additional_params ?>", additionalPath: "<?php echo $additional_path ?>", mainUrl: "<?php echo $action; ?>", mainContainer: "#simplecheckout_form_<?php echo $group ?>", currentTheme: "<?php echo $current_theme ?>", loginBoxBefore: "<?php echo $login_type == 'flat' ? '#simplecheckout_customer .simplecheckout-block-content:first' : '' ?>", displayProceedText: <?php echo $display_proceed_text ? 1 : 0 ?>, scrollToError: <?php echo $scroll_to_error ? 1 : 0 ?>, scrollToPaymentForm: <?php echo $scroll_to_payment_form ? 1 : 0 ?>, notificationDefault: <?php echo $notification_default ? 1 : 0 ?>, notificationToasts: <?php echo $notification_toasts ? 1 : 0 ?>, notificationCheckForm: <?php echo $notification_check_form ? 1 : 0 ?>, notificationCheckFormText: "<?php echo $notification_check_form_text ?>", useAutocomplete: <?php echo $use_autocomplete ? 1 : 0 ?>, useGoogleApi: <?php echo $use_google_api ? 1 : 0 ?>, useStorage: <?php echo $use_storage ? 1 : 0 ?>, popup: <?php echo ($popup || $as_module) ? 1 : 0 ?>, agreementCheckboxStep: <?php echo $agreement_checkbox_step ? $agreement_checkbox_step : '0' ?>, enableAutoReloaingOfPaymentFrom: <?php echo $enable_reloading_of_payment_form ? 1 : 0 ?>, javascriptCallback: function() {try{<?php echo $javascript_callback ?>} catch (e) {console.log(e)}}, stepButtons: <?php echo $step_buttons ?>, menuType: <?php echo $menu_type ? $menu_type : '1' ?>, languageCode: "<?php echo $language_code ?>" }); if (typeof toastr !== 'undefined') { toastr.options.positionClass = "<?php echo $notification_position ? $notification_position : 'toast-top-right' ?>"; toastr.options.timeOut = "<?php echo $notification_timeout ? $notification_timeout : '5000' ?>"; toastr.options.progressBar = true; } jQuery(document).ajaxComplete(function(e, xhr, settings) { if (settings.url.indexOf("route=module/cart&remove") > 0 || (settings.url.indexOf("route=module/cart") > 0 && settings.type == "POST") || settings.url.indexOf("route=checkout/cart/add") > 0 || settings.url.indexOf("route=checkout/cart/remove") > 0) { window.resetSimpleQuantity = true; simplecheckout_<?php echo $group ?>.reloadAll(); } }); jQuery(document).ajaxSend(function(e, xhr, settings) { if (settings.url.indexOf("checkout/simplecheckout&group") > 0 && typeof window.resetSimpleQuantity !== "undefined" && window.resetSimpleQuantity) { settings.data = settings.data.replace(/quantity.+?&/g,""); window.resetSimpleQuantity = false; } }); simplecheckout_<?php echo $group ?>.init(); } },0); </script> <?php } ?> <div id="simplecheckout_form_<?php echo $group ?>" <?php echo $display_error && $has_error ? 'data-error="true"' : '' ?> <?php echo $logged ? 'data-logged="true"' : '' ?>> <div class="simplecheckout"> <?php if (!$cart_empty) { ?> <?php if ($steps_count > 1) { ?> <?php if ($menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-top-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } else { ?> <div id="simplecheckout_step_menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?><span class="simple-step" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><?php echo $step_names[$i-1] ?></span><?php if ($i < $steps_count) { ?><span class="simple-step-delimiter" data-step="<?php echo $i+1; ?>"><img src="<?php echo $additional_path ?>catalog/view/image/next_gray.png"></span><?php } ?><?php } ?> </div> <?php } ?> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div class="simplecheckout-steps-wrapper"> <?php } ?> <?php if (!empty($errors) && $display_error) { ?> <?php foreach ($errors as $error) { ?> <div class="alert alert-danger simplecheckout-warning-block" data-error="true"> <?php echo $error ?> </div> <?php } ?> <?php } ?> <?php $replace = array( '{three_column}' => '<div class="simplecheckout-three-column">', '{/three_column}' => '</div>', '{left_column}' => '<div class="simplecheckout-left-column">', '{/left_column}' => '</div>', '{right_column}' => '<div class="simplecheckout-right-column">', '{/right_column}' => '</div>', '{step}' => '<div class="simplecheckout-step">', '{/step}' => '</div>', '{clear_both}' => '<div style="width:100%;clear:both;height:1px"></div>', '{customer}' => $simple_blocks['customer'], '{payment_address}' => $simple_blocks['payment_address'], '{shipping_address}' => $simple_blocks['shipping_address'], '{cart}' => $simple_blocks['cart'], '{shipping}' => $simple_blocks['shipping'], '{payment}' => $simple_blocks['payment'], '{agreement}' => $simple_blocks['agreement'], '{help}' => $simple_blocks['help'], '{summary}' => $simple_blocks['summary'], '{comment}' => $simple_blocks['comment'], '{payment_form}' => '<div class="simplecheckout-block" id="simplecheckout_payment_form">'.$simple_blocks['payment_form'].'</div>' ); $find = array( '{three_column}', '{/three_column}', '{left_column}', '{/left_column}', '{right_column}', '{/right_column}', '{step}', '{/step}', '{clear_both}', '{customer}', '{payment_address}', '{shipping_address}', '{cart}', '{shipping}', '{payment}', '{agreement}', '{help}', '{summary}', '{comment}', '{payment_form}' ); foreach ($simple_blocks as $key => $value) { $key_clear = $key; $key = '{'.$key.'}'; if (!array_key_exists($key, $replace)) { $find[] = $key; $replace[$key] = '<div class="simplecheckout-block" id="'.$key_clear.'">'.$value.'</div>'; } } echo trim(str_replace($find, $replace, $simple_template)); ?> <div id="simplecheckout_bottom" style="width:100%;height:1px;clear:both;"></div> <div class="simplecheckout-proceed-payment" id="simplecheckout_proceed_payment"><?php echo $text_proceed_payment ?></div> <?php if ($display_agreement_checkbox) { ?> <div class="alert alert-danger simplecheckout-warning-block" id="agreement_warning" <?php if ($display_error && $has_error) { ?>data-error="true"<?php } else { ?>style="display:none;"<?php } ?>> <div class="agreement_all"> <?php foreach ($error_warning_agreement as $agreement_id => $warning_agreement) { ?> <div class="agreement_<?php echo $agreement_id ?>"><?php echo $warning_agreement ?></div> <?php } ?> </div> </div> <?php } ?> <div class="simplecheckout-button-block buttons" id="buttons"> <div class="simplecheckout-button-right"> <?php if ($display_agreement_checkbox) { ?> <span id="agreement_checkbox"> <?php foreach ($text_agreements as $agreement_id => $text_agreement) { ?> <div class="checkbox"><label><input type="checkbox" name="agreements[]" value="<?php echo $agreement_id ?>" <?php echo in_array($agreement_id, $agreements) ? 'checked="checked"' : '' ?> /><?php echo $text_agreement; ?></label></div> <?php } ?> </span> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="nextStep" id="simplecheckout_button_next"><span><?php echo $button_next; ?></span></a> <?php } ?> <a class="button btn-primary button_oc btn" <?php echo $block_order ? 'disabled' : '' ?> data-onclick="createOrder" id="simplecheckout_button_confirm"><span><?php echo $button_order; ?></span></a> </div> <div class="simplecheckout-button-left"> <?php if ($display_back_button) { ?> <a class="button btn-primary button_oc btn" data-onclick="backHistory" id="simplecheckout_button_back"><span><?php echo $button_back; ?></span></a> <?php } ?> <?php if ($steps_count > 1) { ?> <a class="button btn-primary button_oc btn" data-onclick="previousStep" id="simplecheckout_button_prev"><span><?php echo $button_prev; ?></span></a> <?php } ?> </div> </div> <?php if ($steps_count > 1 && $menu_type == '2') { ?> </div> <?php } ?> <?php if ($steps_count > 1 && $menu_type == '2') { ?> <div id="simplecheckout_step_menu" class="simplecheckout-vertical-menu simplecheckout-bottom-menu"> <?php for ($i=1;$i<=$steps_count;$i++) { ?> <div class="checkout-heading simple-step-vertical" style="display:none" data-onclick="gotoStep" data-step="<?php echo $i; ?>"><h4 class="panel-title"><?php echo $step_names[$i-1] ?></h4></div> <?php } ?> </div> <?php } ?> <?php } else { ?> <div class="content"><?php echo $text_error ?></div> <div style="display:none;" id="simplecheckout_cart_total"><?php echo $cart_total ?></div> <?php if ($display_weight) { ?> <div style="display:none;" id="simplecheckout_cart_weight"><?php echo $weight ?></div> <?php } ?> <?php if (!$popup && !$as_module) { ?> <div class="simplecheckout-button-block buttons"> <div class="simplecheckout-button-right right"><a href="<?php echo $continue; ?>" class="button btn-primary button_oc btn"><span><?php echo $button_continue; ?></span></a></div> </div> <?php } ?> <?php } ?> </div> </div> <?php if (!$ajax && !$popup && !$as_module) { ?> </div> <?php include $simple_footer ?> <?php } ?> [/spoiler] при попытке добавить код <?php echo $totalSize; ?> выдает ошибку. Насколько я понимаю он не имеет доступа к этот переменной. Подскажите как найти прилину, или решение, спасипотому что. Вес выводится в 4 строке. Link to comment Share on other sites More sharing options...
Recommended Posts