Zen Cart Logo
Forums / Addon Shipping Modules / [Old] Royal Mail Modules

[Old] Royal Mail Modules

Locked

Views: 220,579

Results 661 to 680 of 936
This thread is locked. New replies are disabled.
29 Mar 2009, 10:13
#661
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

[Old] Royal Mail Modules

Hi,

I'd like to remove this section which is displayed at the checkout:

Estimate Delivery Costs
Country: Please Choose Your Country United Kingdom
State/Province: Type a choice below ...
Post/Zip Code:

Basically because it is going to be the same for every customer. I only ship to the UK using Royal mail.

So I'm guessing, but I would need to set UK as default for country and then hide all the fields

Anyone know which file I need to mod and which code?

Many Thanks

29 Mar 2009, 10:18
#662
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

You should have a look at:

big_royalmail_v2.3.2/optional
big_royalmail_v2.3.2/optional/shopping_cart.php
big_royalmail_v2.3.2/optional/shipping_estimator.php
big_royalmail_v2.3.2/optional/tpl_modules_shipping_estimator.php

these replace the normal shipping estimator with a less blocky table (although the code is about 3 years old) but there you should find where you can knock off the counties.

Philip.

29 Mar 2009, 10:35
#663
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

thanks - I've removed the code but how can I just rem it out?

I tried // or <!

Thank you

29 Mar 2009, 10:47
#664
tonyrobbo avatar

tonyrobbo

New Zenner

Join Date:
Sep 2006
Posts:
17
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Hi Philip,

I'm not sure if you have already updated this, but the compensation is currently £36, which should go up to £39 on the 6th April as it tends to follow the price of 1st class stamp. I just thought I would mention it while you are working on it.

29 Mar 2009, 11:04
#665
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

For REM - ing out (long time since I've heard that expression),

inside php it is

// at the beginning of a line
/* can 
surround multiple
lines */

in html

<!-- <b> this is some html </b> -->
29 Mar 2009, 11:12
#666
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

tonyrobbo:

Hi Philip,

I'm not sure if you have already updated this, but the compensation is currently £36, which should go up to £39 on the 6th April as it tends to follow the price of 1st class stamp. I just thought I would mention it while you are working on it.

As mentioned before, the max insurance the royal mail would pay out is a guideline only and individuals can assess their own requirements, the insurance and handling fees are never updated if someone installs a royal mail upgrade because people tend to change them frequently. The rates are now separate from the modules themselves which are reasonably correct and accurate to 6th April 2009 and a SQL update is available for the UK and for the Airmail services.

Currently Eurozone 48, international standard and international datapost are lagging behind in the updates as they are not frequently used. the UKZR modules is for making a UK specific customised courier modules and the newest module that will be going in tonight is called ukcourier and is a basic courier module for people that don't want to go to the lengths of splitting the country into the "Scottish Highlands" and "Argyll and Bute".

Philip.

29 Mar 2009, 14:32
#667
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Thanks for that. I've removed all but the country and thought I'd be able to remove the choose a country text and replace with UK but i still have to select uk from the drop down

define('PULL_DOWN_DEFAULT', 'United Kingdom');

Can I change this code in tpl_modules_shipping_estimator.php to auto select the second item in the list?

<label class="inputLabel" for="seAddressPulldown"><?php echo CART_SHIPPING_METHOD_ADDRESS; ?></label>

<?php echo zen_draw_pull_down_menu('address_id', $addresses_array, $selected_address, 'onchange="return shipincart_submit();" name="seAddressPulldown"'); ?> <?php I don't know how to do it in PHP ( I only know VB) Many Thanks For your help
29 Mar 2009, 16:55
#668
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

Can you give me a couple of hours ? I'm just trying to work through the next release, and let me just confirm you want the shipping estimator locked to the UK only, no selects, no changes ? or do you want it locked to the user's primary address ?

29 Mar 2009, 17:08
#669
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Sure, no problem. I'd like it fixed to the UK

thank you

29 Mar 2009, 18:28
#670
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

okay you are asking something a little tricky because the zen-car code is convoluted as it deals with free shipping options, whether the person is logged on, whether they are a guest. For the guest on zencart 1.3.8 in includes/templates/template_default/templates/tpl_modules_shipping_estimator.php

<!--
<label class="inputLabel" for="country">ENTRY COUNTRY<?php echo ENTRY_COUNTRY; ?></label>
<?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" onchange="update_zone(this.form);"'); ?>
<br class="clearBoth" />

<label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE; ?></label>
<?php echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $state_zone_id, 'id="stateZone"');?>
<br class="clearBoth" id="stBreak" />
<label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label; ?></label>
<?php echo zen_draw_input_field('state', $selectedState, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"') .'&
nbsp;<span class="alert" id="stText"> </span>'; ?>
<br class="clearBoth" />

<?php
        if(CART_SHIPPING_METHOD_ZIP_REQUIRED == "true"){
?>
<label class="inputLabel"><?php echo ENTRY_POST_CODE; ?></label>
<?php echo  zen_draw_input_field('zip_code', $zip_code, 'size="7"'); ?>
<br class="clearBoth" />
<?php
        }
?>
<div class="buttonRow forward"><?php echo  zen_image_submit(BUTTON_IMAGE_UPDATE, BUTTON_UPDATE_ALT); ?></div>
-->

works and I would leave it at that, because just commenting that out will set the default country to UK (either because the shipping calculator bases it's default country on store location or define('PULL_DOWN_DEFAULT', 'United Kingdom'); that you mentioned. Then you still have the option of a user changing around delivery addresses.

So that's just adding <!-- and --> in the correct places.

29 Mar 2009, 22:16
#671
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

The next version is ready, one thing I forgot to put in the notes, is that in Admin the version of each module is now displayed. Currently available from my website until ZC puts it in their download section.

http://exploitingit.co.uk/versions/big_royalmail_v2.3.3.zip

version 2.3.3
29/03/2009 :
Major change - all modules when installed are now "disabled" by default. The majority of "shop owners" are installing on live sites and so if they install a module it would appear on a customer's shopping trolley and checkout before the owner had a chance to check the figures or that the handling fees are correct.
New Modules - ukcourier, this is a very basic module for shop owners that want a basic courier module without going to the trouble of setting up zones and placing the Scottish Higlands in a separate pricing zone.
specialdeliverysat - This is BETA CODE, this module will appear to the customer after the post office has shut on a Thursday through to when it closes on a Friday, giving the option of Saturday Special Delivery, but it does rely on the server having the correct time and being in the UK, in the next release this will be corrected.
Module Update - Standard Parcels now has a minimum weight setting. THe royal mail calculates the price in a band from 0 to 2Kg, whereas some shop owners may prefer to send items by 1st Class up to a kilo and then offer standard parcels, this new setting enables this scenario and will be migrated across all modules.
Removals - the sql that removed all the royal mail details from the database adn the sql for when peopl upbraded version that were 2~3 years old has been removed from the optional section after a newbie ran it on his live site by mistake and damaged his installation.

29 Mar 2009, 22:59
#672
gineta avatar

gineta

New Zenner

Join Date:
Mar 2009
Posts:
19
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Very nice but I think the rOYAL MAIL MODULE NEED THE parcelforce ADDONS

MANY PARCEL OF ROYAL MAIL USE PARCELFORCE

29 Mar 2009, 23:20
#673
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

a) the UKZR can handle parcelforce and the splitting of the country into zones for the scottish highlands and has been included in the zip file for 3 years, it can also handle any other courier.
b) shouting a demand is not appreciated.

30 Mar 2009, 12:29
#674
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

philip_clarke:

okay you are asking something a little tricky because the zen-car code is convoluted as it deals with free shipping options, whether the person is logged on, whether they are a guest. For the guest on zencart 1.3.8 in includes/templates/template_default/templates/tpl_modules_shipping_estimator.php

<!-- <label class="inputLabel" for="country">ENTRY COUNTRY<?php echo ENTRY_COUNTRY; ?></label> <?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" onchange="update_zone(this.form);"'); ?> <br class="clearBoth" /> <label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE; ?></label> <?php echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $state_zone_id, 'id="stateZone"');?> <br class="clearBoth" id="stBreak" /> <label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label; ?></label> <?php echo zen_draw_input_field('state', $selectedState, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"') .'& nbsp;<span class="alert" id="stText"> </span>'; ?> <br class="clearBoth" /> <?php if(CART_SHIPPING_METHOD_ZIP_REQUIRED == "true"){ ?> <label class="inputLabel"><?php echo ENTRY_POST_CODE; ?></label> <?php echo zen_draw_input_field('zip_code', $zip_code, 'size="7"'); ?> <br class="clearBoth" /> <?php } ?> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_UPDATE, BUTTON_UPDATE_ALT); ?></div> -->
> 
> works and I would leave it at that, because just commenting that out will set the default country to UK (either because the shipping calculator bases it's default country on store location or define('PULL_DOWN_DEFAULT', 'United Kingdom'); that you mentioned. Then you still have the option of a user changing around delivery addresses. 
> 
> So that's just adding <!-- and --> in the correct places.

Hi Phillip,

I can't get that to work.  adding <!-- and --> as shown doesn't show any shipping costs at all.  I'm getting confused though maybe,  should I be changing:
includes/templates/template_default/templates/tpl_modules_shipping_estimator.php

or

includes/templates/YOUR_OVERRIDE_NAME/templates/tpl_modules_shipping_estimator.php

I have it slecting UK now but the state box is still showing and the post code is too.  I also have to refresh the window to make the shipping show up in the shopping cart.

Thank you
30 Mar 2009, 12:51
#675
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

suekay:

Hi Phillip,

I can't get that to work. adding <!-- and --> as shown doesn't show any shipping costs at all. I'm getting confused though maybe, should I be changing:
includes/templates/template_default/templates/tpl_modules_shipping_estimator.php

or

includes/templates/YOUR_OVERRIDE_NAME/templates/tpl_modules_shipping_estimator.php

I have it slecting UK now but the state box is still showing and the post code is too. I also have to refresh the window to make the shipping show up in the shopping cart.

Thank you

Hi Phillip (again)

I have it working now all apart from having to refresh my browser to see the shipping costs. Do you know why that is happening? Once I have refreshed it once then I delete my cart contents and add another product the shipping costs are shown and I don't have to refresh. Iswitched between templates back to classis and it showed up fine, so seems like a problem with Apple zen template.

Thank you

30 Mar 2009, 12:59
#676
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

suekay:

Hi Phillip,

I can't get that to work. adding <!-- and --> as shown doesn't show any shipping costs at all. I'm getting confused though maybe, should I be changing:
includes/templates/template_default/templates/tpl_modules_shipping_estimator.php

or

includes/templates/YOUR_OVERRIDE_NAME/templates/tpl_modules_shipping_estimator.php

I have it slecting UK now but the state box is still showing and the post code is too. I also have to refresh the window to make the shipping show up in the shopping cart.

Thank you

It is a little difficult for me to say as I'm having to use my imagination to guess where you are. The default is

includes/templates/template_default/templates/tpl_modules_shipping_estimator.php

and if changing that results in big mess, then that's the correct page to be changing.

What I suggest is this, just write <h1>HELLO</h1> in the page until you reach just before the bit you want to remove, then write GOODBYE in the page until you get to the end of the section, then surround the hello and goodbye with <!-- and -->. That's pretty much how I located the areas to put the comments.

You are facing some issues with the template though, as the thing changes if you are logged in as a user, or are a guest. As a guest you get presented with the whole postcode, country caboodle but when you are logged in, it calculates things from the delivery addresses saved under that user account, and you really don't want to be removing that as you'll cripple your site.

Actually you could skip the process entirely by just disabling the shipping estimator by going to Admin > configuration > Shipping/ Packaging >Shipping Estimator Display Settings for Shopping Cart and just turning the whole thing off, which might be a better use of your time.

No offence intended but it'd be better to switch it off and get the site running than waste too much time, or produce half garbled output.

Philip.

30 Mar 2009, 13:05
#677
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

suekay:

Hi Phillip (again)

I have it working now all apart from having to refresh my browser to see the shipping costs. Do you know why that is happening? Once I have refreshed it once then I delete my cart contents and add another product the shipping costs are shown and I don't have to refresh. Iswitched between templates back to classis and it showed up fine, so seems like a problem with Apple zen template.

Thank you

If I recall correctly there is some javascript in the original form that reloads the page if the country is switched, off the top of my head, I can't imagine what you are describing as it sounds correct, as you are describing "add a product to the cart and the shipping costs are shown" rather than I do XYZ and then nothing is shown until I do a refresh. (In which case I am 99% sure that it's a session cookie thing where a country is set the first time the page is visited and then reloads with the correct details on the second time when the browser presents the session).

Sorry I seek clarity.

30 Mar 2009, 13:14
#678
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

I'll pm you with my site link and you'll see it happen

Thank you

31 Mar 2009, 02:12
#679
philip_clarke avatar

philip_clarke

Suspended

Join Date:
Sep 2008
Posts:
608
Plugin Contributions:
3

Re: [Old] Royal Mail Modules

Here is a rough idea of the progression of the modules.

In Standard Parcels we have a new minimum weight limit for the service, this will be migrated across the other modules, the upper weight limit is defined by the Royal Mail rates, and can be modified by removing the prices:higher weights so by having a min weight we can now say first class stops at 2 Kgs, from 2 Kgs upwards use standard parcels.

Tropheus refreshed my memory for an idea to maximise sales abroad. Zen cart is set up to have a max weight limit that is the same across all modules, normally 50 Kgs, any order more than that gets split into boxes. This creates a problem with the royal mail since the airmail services are limited to 2 Kgs, but other services are limited to 6Kgs. The problem occurs if someone wants to process a 3 Kg shopping cart, they would be allowed to buy in the UK but not abroad because of the airmail service stopping at 2Kg. To get around this, one would have to set the zencat weight limit for the entire website to 2Kg's and then ZC would quote for 2 x 1.5 Kilo packages. The issue that then turns up is that the UK based customer ordering a 3Kg parcel also gets their order split down when they could be getting a cheaper overall rate using the 3Kg rate in standard parcels or first class etc...

What has been discussed and tested is that the modules will be fixed to ignore the Zencart maximum shipping weight, if they have a rate in them that is heavier. Then the ZC weight is set to 2Kgs. This will have the effect of splitting down a 3Kg parcel for overseas buyers into 2 boxes but leaving the 3Kg rate for UK services.

This override has to be done for all UK services (approx 18 modules) but should boost international sales as the customers will no longer be limited by shipping options.

Under the hood the structure of the modules is changing. Each module uses constants like MODULE_SHIPPING_RMSTDPARCELS_MINWEIGHT and this will be changing to more complex looking code. The complex looking code will take the module name and put it in the middle of the constant. When this has been entirely migrated it will signify the renaming of the modules to version 3.0. The reason for this complex change is that it makes building more modules simpler. Currently to build a new module one only has to copy across two files to a new filename, BUT then one has to do a global case sensitive serach and replace to change every constant and it's easy to make a mistake, whereas the complex looking code that makes the constants from the module name, means that the new code would only need to have three changes made to one file to build a new module rather than 28~30 changes.

The other advantage of the complex looking code is that if a new function is added like adding a minimum weight instead of taking the code from one module and pasting it to another then having to do a replace on the constants, the constants will be self-creating and so the code will be easier to swap between modules if any more feature requests are made.

When version 3.0 is ready, this thread will close and a new one will be opened because it is far too long for the new users to read through as it dates back 3 years and things have changed quite a bit.

Philip

01 Apr 2009, 12:12
#680
toyseller avatar

toyseller

Zen Follower

Join Date:
Jun 2008
Location:
UK
Posts:
209
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

[QUOTE=philip_clarke;707583]

version 2.3.3
29/03/2009 :
specialdeliverysat - This is BETA CODE, this module will appear to the customer after the post office has shut on a Thursday through to when it closes on a Friday, giving the option of Saturday Special Delivery, but it does rely on the server having the correct time and being in the UK, in the next release this will be corrected.

Thank you very Philip for this change. However I think that you need to let people be able to set their own times if possible.

For example in my case. The post office does shut at 17:30
However the post office will not allow any Special Delivery to be booked in after 17:00 as there is paperwork to be completed by p.o. Post van arrives at 17:05, collects mail and leaves at 17:20
If someone orders a special delivery you need time to wrap and take to post office. Also the clock on my website as in the last few days has become 5 hours behind. Only I think there is a module you can download to adjust the clock, but it wouldnt matter at all if you could set your own start and stop time in your software.

Module Update - Standard Parcels now has a minimum weight setting. THe royal mail calculates the price in a band from 0 to 2Kg, whereas some shop owners may prefer to send items by 1st Class up to a kilo and then offer standard parcels, this new setting enables this scenario and will be migrated across all modules.

Thank you so very much !

:D