WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Block Delivery Destination by Country
  • Print
Pages: [1]   Go Down

Author Topic: Block Delivery Destination by Country  (Read 5572 times)

Offline gearup

  • Posts: 82
Block Delivery Destination by Country
« on: March 15, 2013, 10:59:12 PM »
Hi,

I have been looking at how to do this but cant see what to do without thinking I am going to break something ;)

The situation I have is a shop but I need to block delivery to a country (Switzerland).

Basically we only have an export license for our products so in country sales destinations need to be blocked.

I am thinking the way to do this is to disable the specific country selection when the address is entered during the order process.

There would also need to be a message somewhere like [Switzerland-No] representing a text in the language files,
"delivery to Switzerland is not allowed"
and for the Deutsch pages,
"Lieferung zu die Schweiz ist nicht Erlaubt"

Any hints please..

regards,
« Last Edit: March 17, 2013, 10:59:06 AM by gearup »
Logged
Tomorrow is a day we can look forward to but will never see.

Offline nibz

  • Posts: 684
  • Gender: Male
Re: Block Delivery Destination by Country
« Reply #1 on: March 15, 2013, 11:24:47 PM »
https://forum.WebsiteBaker.org/index.php/topic,24377.msg173099.html#msg173099

Check this post...

You can do the same, by removing Switzerland (and more countries if you like).
Logged

Offline gearup

  • Posts: 82
Re: Block Delivery Destination by Country
« Reply #2 on: March 16, 2013, 02:35:29 PM »
Thank you nibz,

That post showed me what to do.

I have removed the Switzerland lines from the EN & DE files and now that destination is no longer selectable as I wanted.

I am now trying to display a message which I inserted into the language dir EN & DE files and it is driving me crazy.

For example, I have the text added in the EN file,
Code: [Select]
$MOD_BAKERY['TXT_NO_DELIVERY'] = 'Delivery not Permitted: Switzerland';

and to display it just under the existing message in file form/title.htm
Code: [Select]
<p class ="mod_bakery_form_p_f">{TXT_FILL_IN_ADDRESS}:</p>
<p class ="mod_bakery_form_p_f">{TXT_NO_DELIVERY}--test</p>

however it does not display, I just see --test

what is going on :(

regards,
Logged
Tomorrow is a day we can look forward to but will never see.

jacobi22

  • Guest
Re: Block Delivery Destination by Country
« Reply #3 on: March 16, 2013, 03:29:59 PM »
define the placeholders in the view_form.php
like

Code: [Select]
'TXT_NO_DELIVERY' => $MOD_BAKERY['TXT_NO_DELIVERY'],
i'm not sure about the line, try it in the Placeholders block nearly Line 246
behind this line
Code: [Select]
// Show cust textfields block using template file
                $tpl->set_var(array(

Logged

Offline gearup

  • Posts: 82
Re: Block Delivery Destination by Country
« Reply #4 on: March 16, 2013, 04:04:30 PM »
Hi jacobi22,

The line I found was (bakery 1.59) view_form.php,
Code: [Select]
line 296 // Show ship form title using template file
$tpl->set_var(array(
'TXT_NO_DELIVERY' => $MOD_BAKERY['TXT_NO_DELIVERY'],
'TXT_FILL_IN_SHIP_ADDRESS' => $MOD_BAKERY['TXT_FILL_IN_SHIP_ADDRESS']
));
$tpl->parse('form', 'ship_title_block', true);

but it still does not display...

Now I found the right place for this on view_form.php at line 123,
Code: [Select]
'TXT_FILL_IN_ADDRESS' => $MOD_BAKERY['TXT_FILL_IN_ADDRESS'],
'TXT_NO_DELIVERY'           =>  $MOD_BAKERY['TXT_NO_DELIVERY'],

Now it all works and displays fine.

Thx for the support.
« Last Edit: March 16, 2013, 04:31:26 PM by gearup »
Logged
Tomorrow is a day we can look forward to but will never see.

jacobi22

  • Guest
Re: Block Delivery Destination by Country
« Reply #5 on: March 16, 2013, 04:32:31 PM »
Quote
Now I found the right place for this on view_form.php at line 123

good to know - thx
Logged

Offline gearup

  • Posts: 82
Re: Block Delivery Destination by Country
« Reply #6 on: March 17, 2013, 11:08:00 AM »
Testing this morning showed a problem.

While removing the country lines in the EN/DE files achieved my goal for the order destination address it caused a problem with the General Settings, shop country & state.

When Switzerland is no longer available this is not good as it is the correct value to be entered here.

I need to put back this change with the EN/DE files and work out some conditional code for the Order process step 1 country selection.

Maybe I could let it be shown but greyed out indicating not selectable.

Update: Man I cant work it out. I just need to disable a selection from a list but it doesnt work for me. I going for a walk, maybe that will help...
« Last Edit: March 17, 2013, 12:46:57 PM by gearup »
Logged
Tomorrow is a day we can look forward to but will never see.

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Block Delivery Destination by Country
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2