Search code examples
phpopencart-3opencart-module

Fatal error: Uncaught Error: Class 'RLFeedFactoryCommon' not found


RLProductsRSSGMFeed - getting an error after installing this extension on the server but the same extension working on the local server

Fatal error: Uncaught Error: Class 'RLFeedFactoryCommon' not found in /home/xxx/public_html/oc/project/system/library/RLFeedGMFactory.php:3
  1. system\library\RLFeedGMFactory.php

    class RLFeedGMFactory extends RLFeedFactoryCommon
    {
       const FEED_KEY_TOKEN = 'new_products_rss';
       //const FEED_KEY_TOKEN = 'RLProductsRSSGMFeed';
    
        private $show_price;
        private $show_image;
        private $image_width;
        private $image_height;
    
     public function BootstrapFeed($controller, $key_hub)
    
  2. system\library\RLFeedFactoryCommon.php

     class RLFeedFactoryCommon
     {
        const FILTER_LP = 'latest-products';
        const FILTER_PP = 'popular-products';
        const FILTER_BS = 'best-sellers';
        public $limit;
        public $include_tax;
        public $currency;
        public $logo;
        public $feed_url;
        public $feed_name;
        public $shop_title;
     public $feed_description;
     public $lang;
     /**
      * @var mixed
      */
     public $filter;
    
  3. admin\controller\extension\feed\new_products_rss.php

    class ControllerExtensionFeedNewProductsRSS extends Controller 
    {
     public $error = array();
     protected $keyFactory;
     protected $feedFactory;
    
     public function index(){
         $this->load->library(RLFeedGMFactory::class);
         $this->feedFactory = new RLFeedGMFactory();
         $this->feedFactory->bootstrap_admin_view($this);
     }
    

Please help me to fix this issue. If you need more information I will give you

Thank you.


Solution

  • I have fixed the issue. actually, the RLFeedGMFactory.php could not find the class from RLFeedFactoryCommon.php so I have simply added a line on the RLFeedGMFactory.php

    require_once '/home/citytech/public_html/oc/sleeve-modding/system/library/RLFeedFactoryCommon.php';
    
    class RLFeedGMFactory extends RLFeedFactoryCommon
    {
    const FEED_KEY_TOKEN = 'new_products_rss';
    //const FEED_KEY_TOKEN = 'RLProductsRSSGMFeed';
    
    private $show_price;
    private $show_image;
    private $image_width;
    private $image_height;
    
    public function BootstrapFeed($controller, $key_hub)
    

    Thank you.