Post by Landmaster » Thu Oct 19, 2017 10:20 pm

I am creating a store where a lot of the orders will be collect from store. I think that it is a bit confusing that when checking out the two default options under Delivery Details are use existing address or add a new one. If the customer is opting to collect then neither of these apply. I want to add a third option "Collect from store".

I have added the following to the top of 'catalog>view>theme>default>template>checkout>shipping_address.tpl':

<div class="radio">
<label>
<input type="radio" name="shipping_address" value="existing" checked="checked" />
<?php echo $text_store_collect; ?></label>
</div>


and changed

<div class="radio">
<label>
<input type="radio" name="shipping_address" value="existing" checked="checked" />
<?php echo $text_address_existing; ?></label>
</div>


to

<div class="radio">
<label>
<input type="radio" name="shipping_address" value="new" />
<?php echo $text_address_existing; ?></label>
</div>


In 'catalog>language>en-gb>checkout>checkout.php' I have added a new line:

$_['text_store_collect'] = 'I want to collect from store';

But I get the following error message:

Notice: Undefined variable: text_store_collect in /var/www/vhosts/omdtakeaway.co.uk/httpdocs/catalog/view/theme/default/template/checkout/shipping_address.tpl on line 6

Any ideas please

Newbie

Posts

Joined
Thu Aug 03, 2017 11:36 pm

Post by kestas » Fri Oct 20, 2017 2:32 am

you should define it in controller file..
$data['text_store_collect'] = $this->language->get('text_store_collect');
that's all

Good luck

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by Landmaster » Fri Oct 20, 2017 4:18 pm

Excellent, thank you

Newbie

Posts

Joined
Thu Aug 03, 2017 11:36 pm
Who is online

Users browsing this forum: No registered users and 90 guests