Post by John R. » Sun Jun 16, 2019 3:07 am

I am new to OpenCart 3.x, and I feel like I might be missing something about the Home Page Featured Module.

I will have multiple stores setup. Some of the stores will have common products. Some of these common products should be featured in one store but not necessarily in the others. I did a backtrace, etc and I wound up looking at the *_module table and the record for 'featured'. It is JSON code:
Original:

Code: Select all

{
  "name": "Home Page",
  "product_name": "",
  "product": [
    "311",
    "675",
    "201",
    "207",
    "200",
    "473"
  ],
  "limit": "16",
  "width": "200",
  "height": "200",
  "status": "1"
}
New:

Code: Select all

{
  "name": "Home Page",
  "product_name": "",
  "status": "1",
  "store": {
    "0": {
      "product": [
        "675",
        "201",
        "207",
        "200",
        "473"
      ],
      "limit": "16",
      "width": "200",
      "height": "200"
    },
    "2": {
      "product": [
        "311"
      ],
      "limit": "16",
      "width": "200",
      "height": "200,
    }
  }
}
Note that there is no store_id data in the original json. I am thinking of changing it to something like the new json above and then fiddling with ...module/featured.php to get it to work. Am I missing a setting somewhere or is this recoding necessary? Note that I assume the 'status' means enabled. Any advice or suggestions appreciated. Again, I feel like I am missing something, but I don't see an option to pick a store for each item in Extensions > Featured
Last edited by John R. on Sun Jun 16, 2019 3:48 am, edited 1 time in total.

Newbie

Posts

Joined
Fri May 31, 2019 2:29 am

Post by John R. » Sun Jun 16, 2019 3:44 am

Well, it seems to be working.... No bugs yet. If anyone is interested, this is my altered featured.php file for the above change. And, incidentally, I am now adding my 'featured' items via JSON code through the database. The main change is changing most or all occurrences of:

Code: Select all

 $setting 

to

Code: Select all

$setting['store'][$this->config->get('config_store_id')]

Newbie

Posts

Joined
Fri May 31, 2019 2:29 am
Who is online

Users browsing this forum: No registered users and 10 guests