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

[Old] Royal Mail Modules

Locked

Views: 220,581

Results 281 to 300 of 936
This thread is locked. New replies are disabled.
7 Mar 2007, 7:51 PM
#281
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

[Old] Royal Mail Modules

You can edit each of the module files (ie. includes/modules/shipping/ ...).

Around line 176 in each of the module files you should see something like:

            $shipping_method = MODULE_SHIPPING_RM1STPACKET_TEXT_WAY . ' : ' . $sw_text . ' ' . MODULE_SHIPPING_RM1STPACKET_TEXT_UNITS;
```'$sw_text' holds the numerical weight, and the constant after it holds the 'kgs'

Remove the last part of that line so it looks like:

```php
            $shipping_method = MODULE_SHIPPING_RM1STPACKET_TEXT_WAY;
```You may also need to remove the text 'Weight' from the 'MODULE_SHIPPING_name of module_TEXT_WAY' defines in each of the respective language files (ie. in includes/languages/english/modules/shipping/ ...)
8 Mar 2007, 11:54 PM
#282
cotswold avatar

cotswold

New Zenner

Join Date:
Dec 2006
Posts:
27
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Many thanks Pixxi for your swift and helpful response. I would like to thanks all who have assisted in the production of this excellent module.

10 Mar 2007, 10:22 PM
#283
theflyingbeard avatar

theflyingbeard

New Zenner

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

Re: [Old] Royal Mail Modules

Hi,

I am new here and am slowly learning about Zen Cart. I have just installed big_royalmail_v2.11 while reading this thread and have experianced some of the issues that have appeared in these posts and resolved them by continuing to read on. I have not yet seen a resolution to posts #211 and #254/5
I have established that the problem seems to be with the two international signed for modules. each seems to work independantly but they dont work together.
If there is a resolution I would be interested to hear it, but I'm sure I can manage if there is no resolution. What concerns me more is that someone has rocked the boat.

bouncingltd:

we do not solicit on the forums
*Last edited by Kim : 26th January 2007 at 04:10 PM. *

Who is this Kim and why has she/he upset Philip? Obviously this kim has not read this thread fully or she/he would have recognised a hard working, straight forward, honest programer with greater personal worries than fixing bugs in a great creation and correcting newbie errors for no personal gain.

The last post from Philip on this thread that I can see was January 28th #271:

bouncingltd:

Righty ho, so I am imagining the donate button up there then ? so it's okay for me to write modules for zen cart, it's okay for me to correct your rather serious cock up with session storing in the database that's leading to hundreds of erroneous errors on any installation since 1.3.5, but it's not okay for me to suggest that I should be renumerated for my work ? instead you can ask for money and then remove my post. Okay then how about this, would anyone like to DONATE large sums of money to me then ?

I quit

If Philip has truly quit then it's a sad loss to this community and Kim needs the boot :lamo: .

If you should read this philip, Thanks for a great mod, may your health improve and I wish you peace of mind.

TFB

10 Mar 2007, 10:53 PM
#284
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

Did you see the post a few above yours (#279)?

I have (while testing) installed all of the modules together on a 1.3.7 shop and not had any errors. If what Philip's posted the solution to is not the cause of yours, perhaps your error is different?

What exactly are you having problems with, and what errors are you getting?

11 Mar 2007, 12:51 PM
#285
funkyslings avatar

funkyslings

New Zenner

Join Date:
Feb 2007
Posts:
9
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Pixxi:

Did you see the post a few above yours (#279)?

I have (while testing) installed all of the modules together on a 1.3.7 shop and not had any errors. If what Philip's posted the solution to is not the cause of yours, perhaps your error is different?

What exactly are you having problems with, and what errors are you getting?

Thats good to hear Pixxi - we have installed all the modules on a 1.3.7 shop and DO get the errors, as several others are reporting - post #279 hasnt fixed the error in terms of the mySQL code being run on the database for the db_cache table.

Are you running file based sessions? We don't really want to switch from db sessions to file based if it can be avoided.

11 Mar 2007, 3:02 PM
#286
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

Are you running file based sessions?

Sessions in the db, cache as file-based.

What exactly are you having problems with, and what errors are you getting?

If you install all the modules on a stock zencart demo store, do you get the same problem?

11 Mar 2007, 9:32 PM
#287
theflyingbeard avatar

theflyingbeard

New Zenner

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

Re: [Old] Royal Mail Modules

Pixxi:

Did you see the post a few above yours (#279)?

I have (while testing) installed all of the modules together on a 1.3.7 shop and not had any errors. If what Philip's posted the solution to is not the cause of yours, perhaps your error is different?

What exactly are you having problems with, and what errors are you getting?

Hi Pixxi,

Yes thanks I did see the post #279 and yes I am using db sessions however I only have 5 shipping modules installed. 6 when both RM International signed for modules are installed.

With only 5 modules installed compared to the 23 modules included in 'Big RM' I did not imagine that a 6th module could possibly take me over the 65k limit. Also as I have no way of knowing how much info is being stored in the sessions and I do not get anything like "error: check your sql syntax where EXPECTED_SORT_ORDER", so I discounted that as the solution.

I dont really understand databases, php or sessions, but, with further experimentation I have found that I can install both RM International signed for modules on their own and they work. I can then install further modules 1 at a time and with various combinations of modules I am able to install between 5 and 7 modules before it all goes tits up. So I guess it must be the session size after all.

I have included the error message I get below. Switching off a module fixes the error so I guess I need to change to file based sessions or try the suggested sql query. Unfortunately I do not know how to do either so I may have to reinstall from scratch and choose files instead of db for sessions.

Then again unless there is an easy way of sorting this I may just use 4 or 5 of the modules for everything :smile: .

Regards TFB

Warning: Variable passed to each() is not an array or object in /home/sites/newmoontrading.co.uk/public_html/includes/classes/db/mysql/query_factory.php on line 114
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/sites/newmoontrading.co.uk/public_html/includes/classes/db/mysql/query_factory.php:114) in /home/sites/newmoontrading.co.uk/public_html/includes/functions/sessions.php on line 102
Warning: Cannot modify header information - headers already sent by (output started at /home/sites/newmoontrading.co.uk/public_html/includes/classes/db/mysql/query_factory.php:114) in /home/sites/newmoontrading.co.uk/public_html/includes/init_includes/init_templates.php on line 78

ZC 1.3.5
big_royalmail_v2.11
db sessions

12 Mar 2007, 1:28 PM
#288
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

You can run the SQL via PHPMyAdmin (there should be a copy on your server) or you can edit the db_cache table directly and change the field type from 'blob' to 'mediumblob'.

Alternatively, to test if the 'blob' field is the cause of your problem, you can change to file-based sessions by finding this line in both your includes/configure.php and admin/includes/configure.php:

 define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

and change it to:

 define('STORE_SESSIONS', ''); // use 'db' for best support, or '' for file-based storage

Also check that you have the right path in admin->configuration->sessions->sessions directory:

eg (your server may differ):

home/your_server_account/public_html/cache

(no trailing slash)

12 Mar 2007, 3:06 PM
#289
theflyingbeard avatar

theflyingbeard

New Zenner

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

Re: [Old] Royal Mail Modules

Took the easy route by switching to file sessions to test before I risk messing about with the db but it doesnt appear to have resolved the problem....

changed includes/configure.php and admin/includes/configure.php as you suggested and checked the sessions path which is:

/home/sites/newmoontrading.co.uk/public_html/cache

still get the same error message at the top of the page as last posted, no difference at all. So maybe it's not the blob thing?

I also get an error message in the body of the page if I click 'Home' (with db and with file sessions):

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXPECTED_PRODUCTS_SORT limit MAX_DISPLAY_UPCOMING_PRODUC' at line 7
in:
[select p.products_id, pd.products_name, products_date_available as date_expected from products p, products_description pd where p.products_id = pd.products_id and p.products_status = 1 and pd.language_id = '1' and p.products_date_available >=20070312 order by EXPECTED_PRODUCTS_FIELD EXPECTED_PRODUCTS_SORT limit MAX_DISPLAY_UPCOMING_PRODUCTS]

I dont know if that sheds more light on the subject or adds to the mystery.....

TFB

12 Mar 2007, 8:31 PM
#290
eddie0uk avatar

eddie0uk

New Zenner

Join Date:
Sep 2005
Posts:
8
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Hi,

I am wondering if someone else has installed the Royal Mail Modules and uses Paypal Express Checkout. (Royal Mail 2.11, Paypal Express with latest patches of March 3rd, Zen-Cart 1.3.7).

My problem is that when returning from Paypal the user is presented with the shipping options page even if I switch on the option of skipping this page and selecting the cheapest option in the Paypal Express Checkout module. A quick look at the Paypal module suggests that if it is not possible to determine the correct shipping option then it returns to the shipping options page.

However if together with the Royal Mail shipping modules I activate e.g. the flat rate (or the zone rates), then in return from Paypal I get the correct final page with all the summary but the shipping option is then flat rate, even if it is more expensive than the royal mail ones.

All this suggests me that for some reason the paypal express module is not able to get info about shipping costs from these royal mail modules while it does correctly from the ones installed with the default zen-cart (I have tried flat rate and zones).

Any help appreciated, thanks

Ed.

12 Mar 2007, 9:27 PM
#291
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

TFB,
Where/when are you getting those errors? Is it as soon as you access the shop, at checkout, when you add to the cart, etc etc?
Secondly, what other mods/addons if any do you have installed?

Ed.
I don't use the Paypal Express checkout, but the discussion here:

http://www.zen-cart.com/forum/showthread.php?t=58104

and the text associated with the 'Auto select cheapest' seem to indicate that it could return you to the shipping page if it's confused? viz:

'When customer returns from PayPal, do we want to automatically select the Cheapest shipping method and skip the shipping page? (making it more express)Note: enabling this means the customer does not have easy access to select an alternate shipping method (without going back to the Checkout-Step-1 page)'

I'll do a bit of digging.

Chuck

12 Mar 2007, 10:30 PM
#292
tphoare avatar

tphoare

New Zenner

Join Date:
Sep 2005
Location:
London
Posts:
88
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

I am getting really confused about the freeshipper module and Royal Mail Module.

What I need to do is have some products which are always shipped free with no other option and others for which we charge.

What I get for the free shipped products is both free shipping and chargeable postage offered.

It's all to do with VAT being chargeable for some products but not others and the only way round it, that I can see, is to make delivery included within the price of zero rated items.

12 Mar 2007, 11:53 PM
#293
eddie0uk avatar

eddie0uk

New Zenner

Join Date:
Sep 2005
Posts:
8
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Chuckl:

Ed.
I don't use the Paypal Express checkout, but the discussion here:

http://www.zen-cart.com/forum/showthread.php?t=58104

and the text associated with the 'Auto select cheapest' seem to indicate that it could return you to the shipping page if it's confused? viz:

'When customer returns from PayPal, do we want to automatically select the Cheapest shipping method and skip the shipping page? (making it more express)Note: enabling this means the customer does not have easy access to select an alternate shipping method (without going back to the Checkout-Step-1 page)'

I'll do a bit of digging.

Chuck

Thanks, it is true for me as well that weights are not calculated correctly with Paypal Express. Oh well, I will disable the skip shipping option and let the user choose the shipping method. Thanks.

13 Mar 2007, 6:45 AM
#294
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

TPHoare,

It's a while since I used the free shipping, but a couple of things spring to mind. Firstly there are 2 free shipping modules, one manically applies itself, the other allows one to set some options.
Secondly, if a product is always free shipping, it should probably be set to Product Type 'product-free shipping', as if it is set to Product Type 'product-general' and one of the other shipping modules sees shipping type attributes like weight or destination zone in the shipping estimator or checkout, they will calculate a shipping cost.

Chuck

13 Mar 2007, 10:14 AM
#295
tphoare avatar

tphoare

New Zenner

Join Date:
Sep 2005
Location:
London
Posts:
88
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Chuck

Thanks for reply - I still get the other RM options showing but by jiggling with the costs I can always show a zero price for free delivery items.

My ultimate solution, however, would be to show zero rated products having zero rated delivery. Don't suppose you have any idea if anything is around that I could use.

Going to be either out of pocket or in trouble with the VAT man otherwise.

Tim

13 Mar 2007, 10:59 AM
#296
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Tim,
You're getting into very murky waters there. As I understand the default position if a charge is made for delivery of zero rated goods, the delivery is regarded as a separate contract, and is vatable. Postage is, however, zero rated.
If delivery is included, or you act as your clients agent in arranging delivery with the Royal Mail on their behalf, etc etc it may also be zero rated. Tis the most fine grained nitpicking I have ever seen. See leaflet 700/24.
Returning to your question itself, it shouldn't be too difficult to detect a zero rated product and zero rate the delivery charges, but tread carefully, as I would imagine that if you don't collect them, you're still liable to pay them.

Chuck

13 Mar 2007, 11:05 AM
#297
tphoare avatar

tphoare

New Zenner

Join Date:
Sep 2005
Location:
London
Posts:
88
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

I know, was on to the VAT people this morning following a customer's query. The VAT person made no bones about it - zero rate goods, zero rate delivery. Also if you look at Amazon, they don't charge VAT on delivery of books, but obviously do on anything else.

Anyway, the safest bet for the time being is to offer free delivery on zero rate goods and charge normally for the rest.

Thanks for reply anyway

13 Mar 2007, 12:34 PM
#298
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

I'd suggest writing the VAT persons name down in a very prominent and accessible place, just in case. They tend to change their minds on such things.
In a nutshell, Zen cart implements the concept of a shipping method based tax, rather than an individual product shipping tax, probably because Sales Tax rather than VAT is used in the USA.
The shipping calc routines simply get a weight, from which they calculate a rate and apply any tax they have been told about. To change this cleanly, one would probably have to also pass the product tax rate in, and apply that instead as a quick and dirty. I'm sure there are more elegant ways to do it.

Chuck

13 Mar 2007, 10:37 PM
#299
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Old] Royal Mail Modules

Ok. I've discovered how to get this error to happen on a test shop, so for anyone who is using database-based caching and having the following errors:

Warning: Variable passed to each() is not an array or object in ... ...and/or:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ...

Warning: Cannot modify header information - headers already sent by (output started at ...

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXPECTED_PRODUCTS_SORT limit MAX_DISPLAY
in:
[select p.products_id, pd.products_name, products_date_available as date_expected from products p, products_description pd where p.products_id = pd.products_id and p.products_status = 1 and pd.language_id = '1' and p.products_date_available >=20070313 order by EXPECTED_PRODUCTS_FIELD EXPECTED_PRODUCTS_SORT limit MAX_DISPLAY_UPCOMING_PRODUCTS]when they install more than a few (typically 5+) Royal Mail modules in their shop, the following (hopefully) will explain what's happening, and why the SQL fix hasn't seemed to work.

As Philip said in his bug report (see post #279 above) the above errors are being caused by the cache_data field in the db_cache table (in the database) not being big enough out-of-the-box to hold the increased data that the Royal Mail module(s) adds - each module adds a load of zone and shipping rate parameters, so the more modules you add, the bigger the stored data becomes until the storage capacity of the cache_data field is exceeded and the data that the shop is attempting to store there becomes corrupted.

As Philip has said, typically your shop will be fine the first time you access it after installing the RM modules (or after enabling more of them in admin) as the parameters are read from the various tables in the database and stored for the first time in the db_cache table) but subsequent visits will give the error (when the corrupted cached data is then read from the db_cache table).

The solution (again as Philip has said) is to either increase the size of that field from 'blob' to 'mediumblob' - either by editing the structure of the field in the db_cache table, or by running the SQL:

 ALTER TABLE db_cache CHANGE COLUMN cache_data cache_data MEDIUMBLOB NOT NULL
```or, alternatively, to change to file-based caching (in your configure.php files) so the db_cache table isn't used.

For those people who've already run the SQL to increase the field size to 'mediumblob' and still have the errors, this is is important step that's been missed so far:

** The db_cache table is still holding corrupted data** - so even after you've ran the SQL, the corrupted data is still in the db_cache table and is being retrieved by the shop, and hence the errors still appear. You need to delete the row of cached data in the db_cache table.

You can delete the row either by editing the db_cache table directly with PHPMyAdmin - it will typically look like this:

```php
cache_entry_name                           cache_data                cache_entry_created
zc_cc21d2f64edffccfe06d12dd3327...        (might appear blank)         1173818124
```( delete the table row beginning 'zc_...')
 
or by changing (temporarily) to file-based caching by editing your includes/configure.php and admin/includes/configure.php and changing:

```php
  define('SQL_CACHE_METHOD', 'database'); 
```to

```php
  define('SQL_CACHE_METHOD', 'file'); 
```Then save both configure.php files and access your shop - the error should disappear. If you wish, you can then change both configure.php entries back to 'database' - providing you've first run the SQL, of course.

If you change to file-based caching, check you have the correct path to your cache folder set in admin->configuration->sessions->session directory - it should look something like (your path will probably differ):
> /home/your server user name/public_html/cache@theflyingbeard (and anyone else who tried it): Apologies for giving you duff info in my post above (post #281) on what to change in your configure files - I was thinking of 'sessions' when I should have been thinking of 'cache'.
14 Mar 2007, 6:20 AM
#300
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: [Old] Royal Mail Modules

Well done Pixxi.
A cachet for your cache work!

Chuck