Git Product home page Git Product logo

Comments (12)

aimeos avatar aimeos commented on June 14, 2024

The config view helper should return overwritten values by the site.
Can you post a screenshot from the sites config table for that setting?

from aimeos-core.

defive avatar defive commented on June 14, 2024

Screenshot from 2022-08-17 12-28-54

I can see the data in the mshop_locale_sites table in the database too, but the method $view->config() does not return anything for any of these values unless they are set in shop.php and then the value from shop.php is returned and not the overridden value.

from aimeos-core.

aimeos avatar aimeos commented on June 14, 2024

In theory it should work because the config from the site item is applied to the config object here:
https://github.com/aimeos/aimeos-laravel/blob/master/src/Aimeos/Shop/Command/AbstractCommand.php#L65

Can you check if the key is available after that line, please?

from aimeos-core.

defive avatar defive commented on June 14, 2024

Okay, I added the following line on line 66 of that file:

file_put_contents('/tmp/testing.txt', print_r($config, true));

Then ran the following line from within the sub-site admin pages

$view->config('controller/jobs/product/import/csv/location', false); 

I checked the testing.txt file and found none of the sub-sites config settings were there.

from aimeos-core.

aimeos avatar aimeos commented on June 14, 2024

Can you check if $config->get( 'controller/jobs/product/import/csv/location' ) in line 66 returns something?

from aimeos-core.

defive avatar defive commented on June 14, 2024

I have added that to my file_put_contents line and the result is an empty file so it's definitely not returning anything

file_put_contents('/tmp/testing.txt',  $config->get( 'controller/jobs/product/import/csv/location' ));

from aimeos-core.

aimeos avatar aimeos commented on June 14, 2024

Does $siteItem->getConfig() contains the configuration you want?

from aimeos-core.

defive avatar defive commented on June 14, 2024

No, that returns an empty array

from aimeos-core.

aimeos avatar aimeos commented on June 14, 2024

Then, you are using a different site which doesn't contain the mentioned configuration settings. You can specify the site for the job as last parameter:

php artisan aimeos:jobs product/import/csv h-and-r-clothing-store

from aimeos-core.

defive avatar defive commented on June 14, 2024

I'm not running the job yet. This code is being run on an admin panel where I want to check whether a CSV file is uploaded for this site. I'm viewing the page/panel on the h-and-r-clothing-store sub-site and have checked that the config setting is set on the h-and-r-clothing-store sub-site locale page but I cannot see any of the custom config items, only what is set in the main shop.php file.

Even if I browse to the main store and view my panel I can't get it to retrieve any custom config items from the main store. i.e. changing the background color on the locale > sites page is not shown if I retrieve it using $view->config();

from aimeos-core.

aimeos avatar aimeos commented on June 14, 2024

This doesn't work in the admin backend yet because the site config isn't applied to the config item of the context here:
https://github.com/aimeos/aimeos-laravel/blob/master/src/Aimeos/Shop/Controller/JqadmController.php#L257-L259

If you can create a PR, we will merge it.

from aimeos-core.

defive avatar defive commented on June 14, 2024

I see, that makes sense! I'll take a look and see if I can add it

from aimeos-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.