Jump to content

Basket


CanadaFB

Recommended Posts

  • 2 weeks later...

If using the Foundation skin, the template you are interested in is content.checkout.confirm.php.

Near line 197, find:

{if !$CTRL_DELIVERY}
<input type="hidden" name="delivery_is_billing" id="delivery_is_billing" value="1">

$CTRL_DELIVERY is false if all items in the cart are digital.
So if false, there will be a hidden form element that says to
use the billing address as the delivery address. Otherwise...

Next, there is this:

{else if $ALLOW_DELIVERY_ADDRESS}
<div class="row">
   <div class="small-12 large-8 columns"><input type="checkbox" name="delivery_is_billing" id="delivery_is_billing" {$DELIVERY_CHECKED}><label for="delivery_is_billing">{$LANG.address.delivery_is_billing}</label></div>
</div>
{/if}

$ALLOW_DELIVERY_ADDRESS is true based on a Store Setting and
whether there are any tangible items in the basket. If true,
there will be a checkbox shown that could be checked or not.
The checkbox gets checked if a certain flag is missing or is
set. So, if set, we want to keep it set. But if missing, we
can decide to ignore that fact, which will not set the checkbox.

That happens in /classes/cubecart.class.php near line 1199:

            if (!isset($this->_basket['delivery_address']['is_billing']) || $this->_basket['delivery_address']['is_billing']) {
                $GLOBALS['smarty']->assign('DELIVERY_CHECKED', 'checked="checked"');
            }

Change to:

            if (false && !isset($this->_basket['delivery_address']['is_billing']) || $this->_basket['delivery_address']['is_billing']) {
                $GLOBALS['smarty']->assign('DELIVERY_CHECKED', 'checked="checked"');
            }

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...