Custom Shipping on Core Commerce

Permalink
Hi Guys,

I tried to set up a couple of custom shipping types on an eCommerce site I'm working on but when I clicked to install them I received this error and now don't know how to get rid of it...

Fatal error: Class 'CoreCommerceNonUkShippingTypeController' not found in /var/www/vhosts/maryreedart.co.uk/httpdocs/packages/core_commerce/models/shipping/type.php on line 223


Hopefully someone out there knows how to get rid of this!

Thanks

Tim

View Replies:
cannonf700 replied on at Permalink Reply
cannonf700
Tim,
Can you post a copy of the controller.php you're using? you'll have to change the extension of the file to .txt (controller.txt) but that will help others see exactly where the error is coming from.
djatomicdog replied on at Permalink Reply
Hi,

No worries... could you just let me know please where I can locate the correct controller.php to send.

Many thanks

Tim
cannonf700 replied on at Permalink Reply
cannonf700
I'm just looking at your post and maybe it's not the controller.php but the type.php: so look in here:
/packages/core_commerce/models/shipping/type.php

How did you go about creating these custom shipping types?
djatomicdog replied on at Permalink Reply 1 Attachment
Thanks.

File attached.

I used this post to create the custom shipping types

http://www.concrete5.org/marketplace/addons/ecommerce/discussion/ad...

Followed the last post and then the lonk to the C5 page on custom shipping types.

Essentially I just wanted a UK £0.00 shipping cost and a rest of the word cost of £4.00

Thanks for your help.

Tim
cannonf700 replied on at Permalink Reply
cannonf700
best I can tell you have your custom attribute folder in the wrong place.
Like the tutorial says the whole folder called "flat" at (your site's root)/packages/core_commerce/models/shipping/types/ has to be copied and moved to here:
(your site's root)/models/shipping/types/flat.
Then the whole folder has to be renamed to whatever you want your class to be (looks like you are going for Non_UK. but the name of the folder can only contain lowercase like this: non_uk.
djatomicdog replied on at Permalink Reply
Thanks, I have double checked where everything is and it all seems to be in the right place. The error turned up when I went to install the custom shipping option in the shipping section of core commerce in the dashboard.

If I remove any of the 2 shipping types I uploaded into the models/shipping/types etc I now get this message...

Warning: require_once() [function.require-once]: Filename cannot be empty in /var/www/vhosts/maryreedart.co.uk/httpdocs/packages/core_commerce/models/shipping/type.php on line 222

Fatal error: require_once() [function.require]: Failed opening required '' (include_path='.::/var/www/vhosts/maryreedart.co.uk/httpdocs/libraries/3rdparty:/var/www/vhosts/maryreedart.co.uk/httpdocs/concrete/config/../libraries/3rdparty') in /var/www/vhosts/maryreedart.co.uk/httpdocs/packages/core_commerce/models/shipping/type.php on line 222

Bit out of my depth here...

Thanks

Tim
billabong replied on at Permalink Reply
billabong
Hey Tim!

you solved that problem? I´m kinda in the same mess right now!
firepixel replied on at Permalink Reply
firepixel
Had the same problem, spent ages debugging and found that it was pulling the package directory from the cache. Clear the cache and away you go!
domwhooley replied on at Permalink Reply
I have the same error message and would like to know what to do next. I just want to back to how it was and work around this shipping thing.
domwhooley replied on at Permalink Reply
The problem was I was using the 'flat' class name in the controller CoreCommerceFlatShippingTypeController not CoreCommerceMyNameShippingTypeController