Duplicate queries inside the Opencart 3 Catalog controller

Asked

Viewed 28 times

0

Good night

I’m developing a custom module for Opencart 3 and I’m having a problem returning the model’s json.

The query is only returning 1 result but within the controller json returns 2 results someone has already gone through so it could give a hint?

Controller

<?php class ControllerExtensionModuleCarroselSliderProduct extends Controller {

    public function index() {
            
        $this->load->language('extension/module/carrosel_slider_product');

        $this->load->model('extension/module/carrosel_slider_product');

        $settings = $this->model_extension_module_carrosel_slider_product->getModulesByCode('carrosel_slider_product');

        echo "<pre>";
        var_dump($settings);
        echo "</pre>";
            
        return $this->load->view('extension/module/carrosel_slider_product', $data);
    }}

Below are some important prints. Thanks

Catalog Controller

Catalog Model

SQL of the query

Duplicate Json return

  • Somebody give me a hand?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.