Post by ahmedisam99 » Mon Nov 29, 2021 7:43 pm

I'm trying to list my shipping method alongside others in checkout. I have created a catalog/model, but still keep getting this error:

Code: Select all

get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, string given
Trace:

Code: Select all

#0 C:\xampp\storage\modification\system\engine\loader.php(83): get_class_methods('Modelextensions...')
#1 C:\xampp\htdocs\opencart\catalog\controller\checkout\shipping_method.php(20): Loader->model('extension/shipp...')
#2 C:\xampp\storage\modification\system\engine\action.php(79): ControllerCheckoutShippingMethod->index()
#3 C:\xampp\htdocs\opencart\catalog\controller\startup\router.php(25): Action->execute(Object(Registry))
#4 C:\xampp\storage\modification\system\engine\action.php(79): ControllerStartupRouter->index()
#5 C:\xampp\htdocs\opencart\system\engine\router.php(67): Action->execute(Object(Registry))
#6 C:\xampp\htdocs\opencart\system\engine\router.php(56): Router->execute(Object(Action))
#7 C:\xampp\htdocs\opencart\system\framework.php(169): Router->dispatch(Object(Action), Object(Action))
#8 C:\xampp\htdocs\opencart\system\startup.php(104): require_once('C:\\xampp\\htdocs...')
#9 C:\xampp\htdocs\opencart\index.php(19): start('catalog')
#10 {main}
upload\catalog\model\extension\shipping\***.php

Code: Select all

<?php
class ModelShipping*** extends Model
{
    public function getQuote($address)
    {
        $method_data = array();

        return $method_data;
    }
}

Newbie

Posts

Joined
Fri Nov 26, 2021 3:30 am

Post by OSWorX » Mon Nov 29, 2021 8:18 pm

And now, what do you expect from us here?
To fix *your" extension, *your* bugs?
The more, you do not provide the whole code!

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by by mona » Mon Nov 29, 2021 9:18 pm

Ditto the above. Not even a please :o

Your file is upload\catalog\model\extension\shipping\***.php
your class is ModelShipping***
one can assume your class should be ModelExtensionShipping

Please read the forum rules and provide proper and accurate information - viewtopic.php?f=176&t=200480
For coding questions you should be posting here - https://www.stackoverflow.com

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 46 guests