Post by sgtoneill » Sat Dec 17, 2016 1:49 am

Hello everyone,

I'm getting an error while trying to check out. Its my first store and i'm not sure what to do right now.
This error appears with any of the payments options selected.


Image

Error:
PHP Fatal error: Uncaught Exception: Error: Could not load model checkout/voucher!

Newbie

Posts

Joined
Thu Dec 15, 2016 9:36 pm

Post by IP_CAM » Sat Dec 17, 2016 9:44 am

that simply means, that the:
catalog/model/checkout/voucher.php
file cannot be found, or handled, for what reason ever...
My advise:
Re-Upload this file to the Server in ASCII-Mode, and use this tool below,
to CHMOD all your Shop directories and Files correctly, (thereby
cleaning out the Shop Sub from all old chached stuff) and then try again.
OpenCart Repair and Cache Clear
https://www.opencart.com/index.php?rout ... on_id=2627
Good Luck! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by sgtoneill » Mon Dec 19, 2016 6:48 pm

Thanks for the reply IP_CAM
Indeed the file is missing. I downloaded OpenCart 2.3 again and the file isn't there.

Any idea where i can find this file? Or fix this problem.

Newbie

Posts

Joined
Thu Dec 15, 2016 9:36 pm

Post by sgtoneill » Tue Dec 20, 2016 12:41 am

More details on the error:


[Mon Dec 19 16:39:19.229704 2016] [:error] [pid 30697] [client 94.60.255.206:63095] PHP Fatal error: Uncaught Exception: Error: Could not load model checkout/voucher! in /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php:59\nStack trace:\n#0 /var/www/html/catalog/model/checkout/order.php(24): Loader->model('checkout/vouche...')\n#1 /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php(178): ModelCheckoutOrder->addOrder(Array)\n#2 /var/www/html/system/engine/proxy.php(25): Loader->{closure}(Array, Array)\n#3 /var/www/html/catalog/controller/checkout/confirm.php(328): Proxy->__call('addOrder', Array)\n#4 /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_action.php(51): ControllerCheckoutConfirm->index()\n#5 /var/www/html/catalog/controller/startup/router.php(25): Action->execute(Object(Registry))\n#6 /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_action.php(51): Controll in /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php on line 59, referer: http://locahost/checkout

Newbie

Posts

Joined
Thu Dec 15, 2016 9:36 pm

Post by basson.vandermerwe » Tue Dec 20, 2016 1:34 am

Hi sgtoneill,

I would suggest doing the following if you do not wish to use the vouchers.
Go to extensions > order totals > gift voucher. And disable then uninstall the vouchers.
Clear your vqmod cache and try again.

Like IP_CAM said the file voucher.php is not there.

If you need to use the Voucher system ensure that your opencart installation has the files required

Regards,


Posts

Joined
Mon Dec 19, 2016 2:59 pm

Post by sgtoneill » Tue Dec 20, 2016 1:50 am

I tried that and still getting that error... I didn't use any voucher its a simple checkout.

Extension is disabled.
Enabled error logging on opencart.

[19-Dec-2016 17:44:47 UTC] PHP Fatal error: Uncaught Exception: Error: Could not load model checkout/voucher! in /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php:59
Stack trace:
#0 /var/www/html/catalog/model/checkout/order.php(24): Loader->model('checkout/vouche...')
#1 /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php(178): ModelCheckoutOrder->addOrder(Array)
#2 /var/www/html/system/engine/proxy.php(25): Loader->{closure}(Array, Array)
#3 /var/www//html/catalog/controller/checkout/confirm.php(328): Proxy->__call('addOrder', Array)
#4 /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_action.php(51): ControllerCheckoutConfirm->index()
#5 /var/www//html/catalog/controller/startup/router.php(25): Action->execute(Object(Registry))
#6 /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_action.php(51): ControllerStartupRouter->index()
#7 /var/www/html/syst in /var/www/html/vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php on line 59

Newbie

Posts

Joined
Thu Dec 15, 2016 9:36 pm

Post by basson.vandermerwe » Tue Dec 20, 2016 1:58 am

Have you cleared the vqmod cache ?
If you look at the errors it is still trying to get the file voucher.php from the cache.

Go to /var/www/html/vqmod/vqcache/ and mv the files from there to a safe location for incase.
Then make sure you have the correct permissions on those folders so the vqmod can recreate the files after it was moved.
Try that and let me know


Posts

Joined
Mon Dec 19, 2016 2:59 pm

Post by sgtoneill » Tue Dec 20, 2016 2:09 am

Yeah i did clear the cache.

Also I moved all the files like you said, they were recreated successfuly and still the same error.

I downloaded opencart 2.3.0.2 again and checked the folder for the voucher.php and there isn't any file like that in the freshly downloaded OpenCart...

Im a bit confused. Why would it try to go to voucher.php if there isnt any (even in the original files) AND the extension is uninstalled...

Newbie

Posts

Joined
Thu Dec 15, 2016 9:36 pm

Post by sgtoneill » Tue Dec 20, 2016 2:13 am

on catalog/model/checkout/order.php

on class ModelCheckoutOrder

There this line:
// Gift Voucher
$this->load->model('checkout/voucher');

I'll try commenting it and see what happens.


Nope. Bad idea.
" Uncaught TypeError: Argument 2 passed to Event::trigger() must be of the type array, integer given, called in"

Newbie

Posts

Joined
Thu Dec 15, 2016 9:36 pm

Post by basson.vandermerwe » Tue Dec 20, 2016 2:31 am

I have just downloaded a fresh install from
https://www.opencart.com/index.php?rout ... load_id=47

Set it up on my test server and completed a full cycle from order to checkout.
No Errors.

OpenCart 2.3.0.2

The voucher file is in catalog/model/extension/total/voucher.php


Have you installed any other extensions from your fresh install ?
Maybe a vqmod or ocmod extension or an extension that requires any of these functions. And have you downloaded the compatible versions ?
Have you tried to disable all the other "extra" extensions from the system and clear the cache each time to determine what extension is maybe causing the error ?


Hey and if all else fails......
Do a fresh installation.


Posts

Joined
Mon Dec 19, 2016 2:59 pm

Post by sgtoneill » Tue Dec 20, 2016 2:51 am

I have a few custom modules installed and a Theme (Simplica).
Im disabling what i can find, still getting the same error.

The voucher.php is indeed in that directory. Not in the one i'm getting the error.

Any change we can pinpoint the module that trying to use checkout/voucher?

Newbie

Posts

Joined
Thu Dec 15, 2016 9:36 pm

Post by basson.vandermerwe » Tue Dec 20, 2016 3:01 am

Well in opencart 2.3+ the directory structure has changed to catalog/controller/extension/payments rather than the older versions /catalog/controller/payments. So if you are trying to run older themes build for Opencart 2.1 and not 2.3 or any extensions used for 2.1 on 2.3 that won`t work as your core files might have changed and that will cause your issues. If you have older version plugins you should purchase the backward compatibility plugins.
Please note that I am only using the versions as an example.

Are all your plugins and themes opencart 2.3x compatible ?
Make sure the vqmod you installed is also for opencart2.3
That is as far as you can go regarding trouble shooting. The next step would be to contact the theme or plugin author for any known issues regarding the latest version of OpenCart 2.3+ to get an update.


Posts

Joined
Mon Dec 19, 2016 2:59 pm

Post by sgtoneill » Tue Dec 20, 2016 3:05 am

Ugh, spend last 2 days trying to figure this out.

Too much trouble.

My store has no products yet, im trying to build a nice barebone store so i can duplicate for different customers. I'll just fresh install and start over.

Wonder what module broke hte checkout... I guess I'll have to try 1 by 1.


Thank you for the help!

Newbie

Posts

Joined
Thu Dec 15, 2016 9:36 pm
Who is online

Users browsing this forum: No registered users and 23 guests