Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 08:58
    shyim labeled #2312
  • 08:58
    shyim unlabeled #2312
  • 08:58
    shyim unlabeled #2312
  • 08:58
    shopwareBot closed #2312
  • 08:58

    shopwareBot on 5.6

    SW-25197 - Remove unnecessary p… Merge branch 'sw-25197/5.6/auto… (compare)

  • 08:50
    shopwareBot labeled #2312
  • 08:50
    shopwareBot labeled #2312
  • Feb 14 13:24
    soebbing opened #2312
  • Feb 14 11:42
    shopwareBot closed #2311
  • Feb 14 11:42

    shopwareBot on 5.6

    SW-25194 - Remove deprecation c… Merge branch 'sw-25194/5.6/auto… (compare)

  • Feb 14 11:42
    shyim labeled #2311
  • Feb 14 11:42
    shyim unlabeled #2311
  • Feb 14 11:42
    shyim unlabeled #2311
  • Feb 14 11:42
    shyim unlabeled #2311
  • Feb 14 10:01
    shopwareBot labeled #2311
  • Feb 14 10:01
    shopwareBot labeled #2311
  • Feb 14 09:48
    jkrzefski edited #2311
  • Feb 14 09:46
    jkrzefski synchronize #2311
  • Feb 14 09:45
    jkrzefski synchronize #2311
  • Feb 14 09:27
    shyim labeled #2305
Schwanzerfaust
@Schwanzerfaust
@JoshuaBehrens Through an event, you define the sorting of the plugins
Husain Fazel
@husainfazel
is this shopware6 or shopware5 chat?
Schwanzerfaust
@Schwanzerfaust
5
Yet better uksort
Husain Fazel
@husainfazel
good, I have a small problem. I have a shopware 5 installation with multiple sub shops. We wanted to take the address + mail fields (from s_core_config_values) for each shop and add them to the impressum page…. this involved creating a new plugin, rewrites etc
unfortunately … this works on the main shop
but not in the sub shops
This is the code in my plugin’s controller
$shop = Shopware()->Container()->get('shop');

        $config  = Shopware()->Config();
        $config->setShop($shop);
$mail    = $config->get('mail');
        $address = $config->get('address’);
when I dump $mail / $address in a sub shop… it’s bool(false)
I can’t get those values as a plugin… debugging the Config class is just a rabbit hole since it gets instantiated so many times during the life cycle
I’m at my wits end trying to figure out how to do something which should be very simple
any thoughts gentleman?
Schwanzerfaust
@Schwanzerfaust
@husainfazel Have you checked which shop are you actually getting with Shopware()->Container()->get('shop') ?
Husain Fazel
@husainfazel
yes I have
I had two methods of getting the shop
if (!$shop) {
            $shop = Shopware()->Container()->get('models')->getRepository(\Shopware\Models\Shop\Shop::class)->getActiveDefault();
        }
Schwanzerfaust
@Schwanzerfaust
Well that's the main store
Husain Fazel
@husainfazel
yes, that’s why it was removed - $shop = Shopware()->Container()->get(‘shop’) successfully retrieves the sub shop
$config->setShop(…) is hard to debug, it doesn’t seem to be working. If I dump the config, ‘mail’ and ‘address’ in _data are both bool(false)
Schwanzerfaust
@Schwanzerfaust
@husainfazel If it's not working then I'm sure there is a repository class, just use that and fech the configuration
Husain Fazel
@husainfazel
do you have any pointers where I can find how to do that?
links to source code / class / example?
Schwanzerfaust
@Schwanzerfaust

Yes

Shopware()->Container()->get('models')->getRepository(\Shopware\Models\Shop\Shop::class)

If you understand what that does, then you can do it with the configuration too

Husain Fazel
@husainfazel
got ya
Schwanzerfaust
@Schwanzerfaust
I don't see any apparent ShopwareConfig model class, so perhaps you chould do it through a direct PDO query
It's all hacked anyways, whatever you add it can't make it worse
Husain Fazel
@husainfazel
Hahah, yeah - does Shopware6 make things a bit saner? I’ve never needed to write a plugin and do the amount of hackery I’ve done today just to add two variables to a static page
Schwanzerfaust
@Schwanzerfaust
Don't know
SkaveRat
@SkaveRat

Holy shit, this was an annoying bug to find:
So, the other day I asked if anyone ever had similar problems like me: having 12k+ articles and suddenly new keywords not being added to the search index.

After an annoyingly long debugging session, I now know why new words weren't added to the index anymore.
Turns out, the s_search_keywords table is "updated" with loooooots of INSERT IGNOREs (about 150k per index refresh in our case).
Fun fact: INSERT IGNORE increases the AUTO_INCREMENT counter.
Another fun fact: s_search_keywords.id is unsigned int(11) - but the column s_search_index.keywordId which references this column is a SIGNED int(11).

Result: the index refreshing job is trying to add $newword to both tables, but silently fails because it can't reference the ID 4240317481 with only a signed int(11)

Geert van Wittlaer
@vanWittlaer
A quick one (for thos who know): what is the right path to use if I wanted to extend a Backend template like Backend/ExtJs/backend/search/index.tpl in my 5.2-style plugin? Thx!
A corresponding link to the docs would be fine as well - apologize if I overlooked it
Schwanzerfaust
@Schwanzerfaust
        $container->addCompilerPass(new EventListenerCompilerPass(), PassConfig::TYPE_BEFORE_REMOVING);
        $container->addCompilerPass(new EventSubscriberCompilerPass(), PassConfig::TYPE_BEFORE_REMOVING);
        $container->addCompilerPass(new DoctrineEventSubscriberCompilerPass());
        $container->addCompilerPass(new FormPass());
        $container->addCompilerPass(new AddConstraintValidatorsPass());
        $container->addCompilerPass(new StaticResourcesCompilerPass());
        $container->addCompilerPass(new AddConsoleCommandPass());
        $container->addCompilerPass(new MatcherCompilerPass());
        $container->addCompilerPass(new LegacyApiResourcesPass());
        $container->addCompilerPass(new ConfigureApiResourcesPass(), PassConfig::TYPE_OPTIMIZE, -500);
        $container->addCompilerPass(new RegisterFieldsCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 500);
        $container->addCompilerPass(new RegisterDynamicController());
        $container->addCompilerPass(new RegisterTypeRepositories());
        $container->addCompilerPass(new ControllerCompilerPass());
        $container->addCompilerPass(new RegisterControllerArgumentLocatorsPass('argument_resolver.service', 'shopware.controller'));
        $container->addCompilerPass(new VersionCompilerPass());
How can I add a compiler pass without having to touch Kernel.php
Did anyone say hack it?
Schwanzerfaust
@Schwanzerfaust
Hell yeah!
Eric Lin
@ericln
hi, new here, quick question, does shopware have a build-in webhook feature that pushes changes out to external system? if not what are the recommended way of doing it ? just need a starting point., thanks!
farhaj
@farhajsiddiqui_twitter
after uploading images the image is not display in backend/frontend
Heiner Lohaus
@hlohaus
@Schwanzerfaust a plugin?
or a own kernel
Yannick Fricke
@YannickFricke
@Neologist This channel is only for Shopware 5
Joshua Behrens
@JoshuaBehrens
@YannickFricke he already posted it in platform :thumbsup:
Yannick Fricke
@YannickFricke
@JoshuaBehrens Ye i know. Just as a hint :)
Joshua Behrens
@JoshuaBehrens
ok
Julian
@julianflapper
Hey, how do I disable merchant registration?
Schwanzerfaust
@Schwanzerfaust
@hlohaus How would you add a compiler pass to a plugin
farhaj
@farhajsiddiqui_twitter
after uploading images the image is not display in backend/frontend
Shyim
@shyim
override build addCompilerPass
J-CUBE-E
@J-CUBE-E
Is it technically possible to connect two different ERP systems to one shop?
Timo Helmke
@t2oh4e
Sure...
J-CUBE-E
@J-CUBE-E
what problems can arise and how can you solve this? can you simply install two connectors and run them in parallel?
Uwe Kleinmann
@kleinmann
If no data overlaps exist you probably will see few if any problems. If both systems manage the same data you will have to handle conflicts in some way.