Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

где в опенкарте поменять адрес самовывоза в корзине?


 Share

Recommended Posts

<table class="simplecheckout-cart" width="100%">
    <colgroup>
        <col class="image">
        <col class="name">

        <col class="quantity">
        <col class="price">
        <col class="total">
        <col class="remove">
    </colgroup>

    <tbody>
    <h2>Шаг 1</h2>
    <p>Ваш заказ:</p>
    <hr>
    <?php foreach ($products as $product) { ?>
    <tr>

        <td class="name"  style="width:10%;">
            <?php if ($product['thumb']) { ?>
            <div class="image img hidden-xs" >
                <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" /></a>
            </div>
            <?php } ?>

            <?php if (!$product['stock'] && ($config_stock_warning || !$config_stock_checkout)) { ?>
            <span class="product-warning">***</span>
            <?php } ?>
            <div class="options">
                <?php foreach ($product['option'] as $option) { ?>
                &nbsp;<small><?php echo $option['value']; ?></small><br />
                <?php } ?>
            </div>
            <?php if ($product['reward']) { ?>
            <small><?php echo $product['reward']; ?></small>
            <?php } ?>
        </td>

        <?php if (!in_array($product['key'], $bonus_products)) { ?>
        <td class=''>  <a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></td>
        <td>
            <?php if ($product['price'] != $product['discount_price'] && $product['indiscount'] == 1) { ?>
            <nobr><span style="text-decoration: line-through; color: #F63966; margin-left:5px;"><?php echo $product['price']; ?></span>
                <span style="color: red; margin-left:5px;"><?php echo $product['discount_price']; ?></span></nobr>
            <?php } else { ?>
            <nobr><span><?php echo $product['price']; ?></span></nobr>
            <?php } ?>
        <td class="quantity" width="80px">
            <img src='<?php echo $simple->tpl_joomla_path() ?>catalog/view/image/minus.png' border='0' <?php if ($quantity > 1) { ?>onclick="jQuery(this).next().val(~~jQuery(this).next().val()-1);simplecheckout_reload('cart_value_decreased');"<?php } ?>>
            <input type="text"  class="no-button" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="1" onchange="simplecheckout_reload('cart_value_changed')" />
            <img src='<?php echo $simple->tpl_joomla_path() ?>catalog/view/image/plus.png' border='0' onclick="jQuery(this).prev().val(~~jQuery(this).prev().val()+1);simplecheckout_reload('cart_value_increased');">
        </td>
        <td class="total"><nobr><?php echo $product['total']; ?></nobr></td>
        <td class="remove">
            <img style="cursor:pointer;" src="<?php echo $simple->tpl_joomla_path() ?>/catalog/view/theme/default/img/remove-small.png" onclick="jQuery('#simplecheckout_remove').val('<?php echo $product['key']; ?>');simplecheckout_reload('product_removed');" />
        </td>
        <?php } else { ?>
        <td colspan="3" class=''>  <a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></td>
        <td class="quantity" style="visibility: hidden;">
            <input type="text"  class="no-button" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="1" onchange="simplecheckout_reload('cart_value_changed')" />
        </td>
        <td></td>
        <?php } ?>
    </tr>
    <?php } ?>
    <?php if (isset($free_products)) { ?>
    <?php foreach ($free_products as $free_product) { ?>
    <tr>
        <td class="image">
            <?php if ($free_product['thumb']) { ?>
            <div class="image img hidden-xs" >
            <a href="<?php echo $free_product['href']; ?>"><img src="<?php echo $free_product['thumb']; ?>" alt="<?php echo $free_product['name']; ?>" title="<?php echo $free_product['name']; ?>" /></a>
            </div>
            <?php } ?></td>
        <td class="name"><a href="<?php echo $free_product['href']; ?>"><?php echo $free_product['name']; ?></a>
        <td class="quantity"></td>
        <td></td>
        <td class="total">Бесплатно</td>
    </tr>
    <?php } ?>

    <?php } ?>

    <?php foreach ($vouchers as $voucher_info) { ?>
    <tr>
        <td class="image"></td>
        <td class="name"><?php echo $voucher_info['description']; ?></td>
        <td class="model"></td>
        <td class="quantity">1</td>
        <td class="price"><nobr><?php echo $voucher_info['amount']; ?></nobr></td>
        <td class="total"><nobr><?php echo $voucher_info['amount']; ?></nobr></td>
        <td class="remove">
            <img style="cursor:pointer;" src="<?php echo $simple->tpl_joomla_path() ?>catalog/view/image/close.png" onclick="jQuery('#simplecheckout_remove').val('<?php echo $voucher_info['key']; ?>');simplecheckout_reload('product_removed');" />
        </td>
    </tr>
    <?php } ?>
    </tbody>
</table>

<div class="sep-sm"></div>
<?php if (isset($modules['coupon'])) { ?>

<div class='simplecheckout-cart-total'>
    <div class='form-group text_none'>
        <div class="col-sm-7">Использовать купон, флаер или промо-код</div>
        <div class="col-sm-5">
            <input class="form-control" id="ps1" placeholder="Скидочный код" type="text" name="coupon" value="<?php echo $coupon; ?>"/>
        </div>
    </div>
    <div class='form-group'>
        <div class="col-sm-7">Использовать дисконтную карту</div>
        <div class="col-sm-5">
            <input class="form-control" placeholder="Номер карты" id="ps2" type="text" name="discount_card" value="<?php echo $discount_card; ?>"/>
        </div>
    </div>
    <div class='form-group'>
        <div class="col-sm-12">
            <?php if (isset($this->session->data['local_pickup'])) { ?>
            <div><input type="radio" id="delivery_no" name="delivery_no" onclick="delivery(1)"/> Бесплатная доставка</div>
            <div><input type="radio" id="delivery_no" name="delivery_no" onclick="delivery(0)"/> Самовывоз из суши-бара на Софиевской Борщаговке, ул. Мира, 9 (Скидка 10%)</div>
            <div><input type="radio" id="delivery_yes" name="delivery_no" onclick="delivery(0)"/ disabled> Самовывоз из суши-магазина Оболонский проспект, 21 (Скидка 10%)</div>
            <?php } else { ?>
            <div><input type="radio" id="delivery_no" name="delivery_no" checked="true" onclick="delivery(1)"/> Бесплатная доставка</div>
            <div><input type="radio" id="delivery_no" name="delivery_no" onclick="delivery(0)"/> Самовывоз из суши-бара на Софиевской Борщаговке, ул. Мира, 9 (Скидка 10%)</div>
            <div><input type="radio" id="delivery_yes" name="delivery_yes" onclick="delivery(0)"/ disabled> Самовывоз из суши-магазина Оболонский проспект, 21 (Скидка 10%)</div>
            <?php } ?>
            <p id="ourAddress" style="width: 400px; font-weight: 600;"></p>
        </div>
    </div>
</div>

<script>
    $("#delivery_yes").click(function () {
        $("#delivery_no").prop('checked', false);
    });
    $("#delivery_no").click(function () {
        $("#delivery_yes").prop('checked', false);
    });

    function delivery(status) {
        if (!status) {
            $("#checkout_customer_custom_street").val("Самовывоз");
            // $("#ourAddress").html("Самовывоз от ТЦ \"Европорт\", ул. Огиенко 15-А, 3 этаж");
            $("#deliv_street_real").val(0);
        }
        else {
            $("#checkout_customer_custom_street").val("");
            $("#ourAddress").html("");
            $("#deliv_street_real").val("");
        }
    };

</script>

<?php } ?>
<?php if (isset($modules['reward']) && $points > 0) { ?>
<div class="simplecheckout-cart-total">
    <span class="inputs"><?php echo $entry_reward; ?>&nbsp;<input type="text" name="reward" value="<?php echo $reward; ?>" onchange="simplecheckout_reload('reward_changed')"  /></span>
</div>
<?php } ?>
<?php if (isset($modules['voucher'])) { ?>
<div class="simplecheckout-cart-total hidden">
    <span class="inputs"><?php echo $entry_voucher; ?>&nbsp;<input type="text" name="voucher" value="<?php echo $voucher; ?>" onchange="simplecheckout_reload('voucher_changed')"  /></span>
</div>
<?php } ?>
<?php if (isset($modules['coupon']) || isset($modules['reward']) || isset($modules['voucher'])) { ?>
<div class="simplecheckout-cart-total simplecheckout-cart-buttons">
    <span class="inputs buttons"><a id="simplecheckout_button_cart" onclick="simplecheckout_reload('cart_changed');" class="btn btn-brand2"><span>Пересчитать со скидкой</span></a></span>
</div>
<?php } ?>

<hr>

<?php foreach ($totals as $total) { ?>
<div class="simplecheckout-cart-total" id="total_<?php echo $total['code']; ?>">
    <table width="100%">
        <tr class="no-brd">

            <td width="75%"><span><?php echo $total['title']; ?>:</span></td>

            <td class="highlight"><span class="simplecheckout-cart-total-value"><nobr><?php echo $total['text']; ?></nobr></span>
        
        <span class="simplecheckout-cart-total-remove">
            <?php if ($total['code'] == 'coupon') { ?>
            <img src="/catalog/view/theme/default/img/remove-small.png" onclick="jQuery('input[name=coupon]').val('');simplecheckout_reload('coupon_removed');" />
            <?php } ?>
            <?php if ($total['code'] == 'voucher') { ?>
            <img src="<?php echo $simple->tpl_joomla_path() ?>catalog/view/image/close.png" onclick="jQuery('input[name=voucher]').val('');simplecheckout_reload('voucher_removed');" />
            <?php } ?>
            <?php if ($total['code'] == 'reward') { ?>
            <img src="<?php echo $simple->tpl_joomla_path() ?>catalog/view/image/close.png" onclick="jQuery('input[name=reward]').val('');simplecheckout_reload('reward_removed');" />
            <?php } ?>
         </span>
            </td>
        </tr>

    </table>
</div>
<?php } ?>

<script>
    total_price = parseInt($('#total_total table .highlight .simplecheckout-cart-total-value nobr').html());
</script>

<?php if ($attention) { ?>
<blockquote class="simplecheckout-warning-block"><?php echo $attention; ?></blockquote>
<?php } ?>
<?php if ($error_warning) { ?>
<blockquote class="simplecheckout-warning-block"><?php echo $error_warning; ?></blockquote>
<?php } ?>

<input type="hidden" name="remove" value="" id="simplecheckout_remove">
<div style="display:none;" id="simplecheckout_cart_total"><?php echo $cart_total ?></div>

<script type="text/javascript">
    jQuery(function(){
        jQuery('#cart_total').html('<?php echo $cart_total ?>');
        jQuery('#cart-total').html('<?php echo $cart_total ?>');
        jQuery('#cart_menu .s_grand_total').html('<?php echo $cart_total ?>');
        <?php if ($simple_show_weight) { ?>
            jQuery('#weight').text('<?php echo $weight ?>');
        <?php } ?>
        <?php if ($template == 'shoppica2') { ?>
            jQuery('#cart_menu div.s_cart_holder').html('');
            $.getJSON('index.php?<?php echo $simple->tpl_joomla_route() ?>route=tb/cartCallback', function(json) {
                if (json['html']) {
                    jQuery('#cart_menu span.s_grand_total').html(json['total_sum']);
                    jQuery('#cart_menu div.s_cart_holder').html(json['html']);
                }
            });
        <?php } ?>
        <?php if ($template == 'shoppica') { ?>
            jQuery('#cart_menu div.s_cart_holder').html('');
            jQuery.getJSON('index.php?<?php echo $simple->tpl_joomla_route() ?>route=module/shoppica/cartCallback', function(json) {
                if (json['output']) {
                    jQuery('#cart_menu span.s_grand_total').html(json['total_sum']);
                    jQuery('#cart_menu div.s_cart_holder').html(json['output']);
                }
            });
        <?php } ?>
    });
</script>

<?php if ($simple->get_simple_steps() && $simple->get_simple_steps_summary()) { ?>
<div id="simple_summary" style="display: none;margin-bottom:15px;">

    <table class="simplecheckout-cart">
        <colgroup>
            <col class="image">
            <col class="name">
            <col class="quantity">
            <col class="price">
            <col class="total">
        </colgroup>
        <thead>
        <tr>
            <th class="image"><?php echo $column_image; ?></th>
            <th class="name"><?php echo $column_name; ?></th>
            <th class="quantity"><?php echo $column_quantity; ?></th>
            <th class="price"><?php echo $column_price; ?></th>
            <th class="total"><?php echo $column_total; ?></th>
        </tr>
        </thead>

        <tbody name=''>


        <?php foreach ($products as $product) { ?>
        <tr>
            <td class="image">
                <?php if ($product['thumb']) { ?>
                <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" /></a>
                <?php } ?>
            </td>
            <td class="name">
                <a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
                <?php if (!$product['stock'] && ($config_stock_warning || !$config_stock_checkout)) { ?>
                <span class="product-warning">***</span>
                <?php } ?>
                <div class="options">
                    <?php foreach ($product['option'] as $option) { ?>
                    &nbsp;<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small><br />
                    <?php } ?>
                </div>
                <?php if ($product['reward']) { ?>
                <small><?php echo $product['reward']; ?></small>
                <?php } ?>
            </td>
            <td class="quantity"><?php echo $product['quantity']; ?></td>
            <td class="price"><nobr><?php echo $product['price']; ?></nobr></td>
            <td class="total"><nobr><?php echo $product['total']; ?></nobr></td>
        </tr>
        <?php } ?>
        <?php foreach ($vouchers as $voucher_info) { ?>
        <tr>
            <td class="image"></td>
            <td class="name"><?php echo $voucher_info['description']; ?></td>
            <td class="quantity">1</td>
            <td class="price"><nobr><?php echo $voucher_info['amount']; ?></nobr></td>
            <td class="total"><nobr><?php echo $voucher_info['amount']; ?></nobr></td>
        </tr>
        <?php } ?>
        </tbody>
    </table>

    <?php foreach ($totals as $total) { ?>
    <div class="simplecheckout-cart-total" id="total_<?php echo $total['code']; ?>">
        <span><b><?php echo $total['title']; ?>:</b></span>
        <span class="simplecheckout-cart-total-value"><nobr><?php echo $total['text']; ?></nobr></span>
    </div>
    <?php } ?>
</div>

<?php } ?>

Link to comment
Share on other sites


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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.