Jump to content

Adding Shipping Zones when using 'By Weight' option


Guest cybahous
 Share

Recommended Posts

Guest cybahous

There are 4 zones available when I use the 'By Weight' option in Shipping, however our carrier, Parcelforce, has 9 zones. Is there a way to add 5 more zones?

I'm using V 5.1.5

Stew

Link to comment
Share on other sites

NOTE: These edits will not survive an upgrade. Please be aware of this.

Here are some small edits:

modulesshippingBy_Weightskinadminindex.tpl

FIND (beginning of the whole line):

<div><label for="status">{$LANG.common.status}</label>.....

ADD AFTER:

<div><label for="zone_count">{$LANG.by_weight.zone_count}</label><span><input type="text" style="width:3em;" name="module[zone_count]" id="zone_count" value="{$MODULE.zone_count}" class="textbox" /></span></div>




CHANGE:

{for $i = 1; $i <= 4; $i++}

TO:


{for $i = 1; $i <= $MODULE.zone_count; $i++}



modulesshippingBy_Weightlanguagemodule.definitions.xml

FIND:

</group>

ADD BEFORE:


<string name="zone_count"><![CDATA[Number of Zones]]></string>




modulesshippingBy_Weightconfig.xml

FIND:

<version>1.1.0</version>

REPLACE WITH:

<version>1.1.1</version>



modulesshippingBy_Weightshipping.class.php

FIND:

## Build array of ISO Codes

for($i=1;$i<=5;$i++){



REPLACE the second line WITH:


for($i=1;$i<=$this->_settings['zone_count'];$i++){

Go to the Shipping Modules, By Weight admin control panel for this module. Compared to what you may have seen before, you will now see a new form element just under the status mark where you can enter the number of zones you want. Also, you will not see any zones listed.

Enter 9 for the number of zones. There is no checking on the value entered here. If you enter a non-digit, the module will blow-up. If you enter 7 million, the module will blow-up. Click Save.

You will be returned to the module's control panel. You should now see the number zones chosen.

I have not tested these edits beyond this point. Please experiment by adding the requested information in all the zones. Click Save.

Place a series of test orders using each of the various zones.

Link to comment
Share on other sites

Guest cybahous

Hi Bsmither

I made the changes in to put in your post, but there was no difference when I logged back in. I tried in Explorer and Chrome, but still no joy, it was the same screen with 4 blank zones and nowhere to add anymore. I put everything back to normal, edited the files again and tried once more, but still no luck. I've copied the relevant sections from the edited files below for you to take a look at to see if I have done something obviously wrong. My apologies if I have. Stew

modulesshippingBy_Weightskinadminindex.tpl

<div><label for="status">{$LANG.common.status}</label><span><input type="hidden" name="module[status]" id="status" class="toggle" value="{$MODULE.status}" /></span></div>

<div><label for="zone_count">{$LANG.by_weight.zone_count}</label><span><input type="text" style="width:3em;" name="module[zone_count]" id="zone_count" value="{$MODULE.zone_count}" class="textbox" /></span></div>

---------------------------------------------------------------------------------------------------------------------------------------------

modulesshippingBy_Weightlanguagemodule.definitions.xml

<string name="zone"><![CDATA[Zone]]></string>

<string name="zone_count"><![CDATA[Number of Zones]]></string>

</group>

---------------------------------------------------------------------------------------------------------------------------------------------

modulesshippingBy_Weightconfig.xml

<description><![CDATA[Weight based Shipping Module]]></description>

<version>1.1.1</version>

---------------------------------------------------------------------------------------------------------------------------------------------

modulesshippingBy_Weightshipping.class.php

## Build array of ISO Codes

for($i=1;$i<=$this->_settings['zone_count'];$i++){

$zones[$i] = explode(',', str_replace(' ', '', strtoupper($this->_settings['zone'.$i.'Countries'])));

Link to comment
Share on other sites

Guest cybahous

Hi Bsmithers, tried that option, cleared the cache, but still no new screen. Logged out, logged back in, cleared cache again, no change.

Can you check the .tpl file above and confirm that I have edited it correctly.

When you were working on the code, did you see the screen you described?

Stew

Link to comment
Share on other sites

I am so, so sorry. I forgot one line to edit in the file modulesshippingBy_Weightskinadminindex.tpl

Change:

{for $i = 1; $i <= 4; $i++}

to:

{for $i = 1; $i <= $MODULE.zone_count; $i++}

I have edited my original instructions.

But did you at least see the new field where you enter how many zones you wanted?

Link to comment
Share on other sites

Guest cybahous

Do we know when it is coming out? I'd hate to do all this work just to have an upgrade mess it up, especially when the upgrade is fixing the original problem.

Link to comment
Share on other sites

CC Management asked me for my FTP today!!! to install it!

They are going to install it for me on my website!!! WooHoo!!!!

I should have it in a day!

One of my friends here on the forum is up grading to CC5 today because he also got the announcement via email...

We both had work orders in their CC system.

Put in a request to have it installed!!!! Good luck...

(I hope it is sooo good after this long wait!!! I'm sooo happy!!! )

Link to comment
Share on other sites

Now that I have the I have a v5 all in one shipping module....

I need a suggestion (Help) for implementation/configuring the information for the Flat Rate USPS shipping, for US, and CA and Internations; rates and by weights???

What Should I do:

  • Look for tutorial information? (where? -- there does not seem to be much)
  • Contact the USPS to configure it for me? (I don't know if they do that?)
  • Hire a free lance expert in filling out the shipping configuration for CC? (Who has experience and time?)

What have others done? I'm about half lost at filing in the blanks for shipping mods... I'd rather just get it done!

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...