Set a shopping world for a specific subshop - shopware

I am trying to set a shopping world for a specific subshop in a shopware installation. I have multiple subshops with different domains related to the same thing, in other words, I have for example, cheap-clothes.com, really-cheap-clothes.com, the-cheapest-clothes.com and they all display the same website, the domain is the only thing that change, so the categories are the same on every subshop.
That said, how is it possible to set a shopping world for a specific subshop?
Thanks in advance,
Daniel.

This is only possible when separating the category-trees. The display of shopping worlds is controlled by category assignment. You need to duplicate the categories and the product assignments in order to show a different content.
I would recommend developing your own plugin or a theme for each subshop where you can seapate the shopping worlds based on their ID.

Related

How to translate product shopping experience texts?

I have been trying to find out whether one can translate the content from Shopping experience product pages.
I have found the relevant documentation for Categories but I see no mention of the corresponding product translations.
It seems that this should be a thing that is translatable in the settings where you select the per-product configs for the blocks
I have tried the following:
Assign a layout to a product and set its value to "ENGLISH BANNER" in English
Switch to German (the "ENGLISH BANNER" is still there)
Replace it with "GERMAN BANNER".
Switch to English again and check the results.
Am I doing something wrong? Is this a bug? The Shopware version is 6.4.10. Is there a non-hacky way to translate the content from per-product for product pages in Shopping experiences?
The shop's default language is English if this is relevant.
I can reproduce this in higher Shopware versions (6.4.16.0)
The data is stored at product_translation in the slot_config field, so it looks like this should be translatable in the long run but obviously it's not yet implemented and/or a bug.
You might want to create a request at https://issues.shopware.com/
As a not-to-hacky workaround you might add your translated data to the product entity itself using a custom field. This custom field can be inserted via twig {{ customFields.my_test_field }} in the product and the translation works for such custom fields.

Is there a simple example on how to add an entity extension for customers with field in the admin of shopware 6?

I want to add an entity extension to a customer in shopware 6. I was able to do so with the examples in the documentation of shopware on the PHP side and now I wonder how to display and modify this new "field" in the shopware 6 backend.
I searched a lot and also tried to find a simple plugin where I could get some inspiration from, but unfortunately I'm not able to find.
So again the question 😊 Is there any simple example on how to add an entity extension for customers with field in the admin of shopware 6? Or an example plugin, where I can see how it could be done?
What you're (likely) trying to achieve would be the combination of multiple separate tasks.
If you want to store data in the database you'd need a new custom entity
If you want to associate the new entity with the customer you'll need the entity extension
You'll need to add a new field in the administration
I've linked to examples respectively, but you'll probably need to take the time and invest in studying the documentation regardless.
I also created an example plugin that combines all these steps and adds a new entity with a height field as association to the customer and displays the field in the administration. You can find the repository here.
Not sure if you considered this, but depending on what you are trying to accomplish, the simplest way is probably adding a custom field (this can be done progamatically or even via the admin panel).
The drawback is, that those fields' values are stored as JSON and it has drawbacks when you try to search through them.

Shopware 6 - shopping experiences layout for search results

i'm using Shopware 6.3.0.1.
is there currently a possibility to assign a standard layout from the shopping experiences to the search results?
No, this is not possible by now. Everytime you create a new category in the administration it is created with no cmsPage selected at all.
Depending on the way you create the category there are ways to hook into the code and set one on creation as well. I assume an event subscriber listening for the creation of a category entry is a way to do it.
Currently shopware doesn't support cmsPages for the search result.
You can vote for this Feature Request:
https://issues.shopware.com/issues/NEXT-10403

Show Solr Autosuggest results with types/categories

we are configuring solr for an e-commerce site which features a range of products across multiple categories and brands. In addition to that there is also a number of landing pages which can be reached through the search. So overall, we have 4 types of possible results, I'll use an electronics site as an example:
Categories (i.e. "Smartphones")
Brands (i.e. "Samsung"
Products (i.e. "Samsung Galaxy S4")
Pages (i.e. "How-To Guide to your Samsung")
What we would like solr to do is
a) show those things in autosuggest (right now it shows the first three, but doesn't show pages as they aren't part of the product catalog through which it searches)
b) show the "type" of the result in the box next to the result. To illustrate, if I would type "Sam", the autosuggest box would look something like this:
Samsung Brand
Samsung Galaxy S4 Product
Samsung Galaxy S5 Product
How-To Guide to your Samsung Page
Android Smartphones Category
Particularly the last point is really important and we couldn't find any way to do this yet. Any help would be greatly appreciated.
You can create a separate core for all the stuff you want to be able to auto complete on, where you keep both the type and the value. That way you get the flexibility of adding new auto complete features later, and you'll avoid introducing a wide set of different documents in your main core.
Another option is to add a type field to your main schema, and create documents for Page objects as well (depending on how you create the existing auto complete categories - if you have three different types of documents in the index already, it would be quick to add a new field that just contains the type of the document as well).

Create a list of pages in Orchard

Lets say for example, I have a list of products that each have it's own page... in what way can I create a single page that will list each product as it's contents as a list (with hyperlinks)? Not really sure how to do this directly in Orchard - or will I need to create a custom page / widget? Thanks for any help... new to Orchard and not sure how to tackle this.
You have a couple options. I believe the Orchard gallery at orchardproject.net has a module called Simple Commerce that may solve your problem. (it's simple so it might not)
(In the following section, I've tried to boldface the terminology words that are 1) are crucial to understanding how to use Orchard and 2) helpful in finding your way around the dashboard)
Another option may be first creating a Content Type--probably one named Product with some Fields describing an individual product. Price, SKU and description come to mind, but you'll be better able to describe your own products. Each Content Type in Orchard can be associated with any combination of Parts. You may have to research which ones you actually want for an individual product, but I'd recommend:
Body (this could replace the Description I suggested above) You could include any amount of HTML/script in this section to make your individual product pages look fancy!
Common (this has to be added when Containable is used)
Containable (this will allow the items to be listed)
Route (so you can link to a specific product)
This gives each product its own slug (URL)
Tags (to allow products to be categorized)
Now, you need to create a new List from the dashboard so you can display the products together (and inherit other features like pagination, etc). Be sure to select the Product Content Type in the Contains drop down list.
Then, you can start creating your Content (your Products) one by one. In the dashboard, click the new Product item and describe each new piece of Content.
Finally, you can link directly to this new List using the Products List's *slug*. You could (and might want to) add the Products List to your main navigation menu. Clicking the Products List and checking the "Show on main menu" box will automagically add a navigation button directly to this page. You could, of course, link to this List from anywhere using the slug (also found on the list's edit page)
This page, from the Orchard documentation pages describes more things you can do with a list of content like modifying the layout of the list, placing content fields in different places and even converting your products to widgets which you could use to display some promotional product offering in a special spot on your site.
I highly recommend reading through at least the documentation provided on the Orchard site to get a good grasp of what this CMS can do out of the box and what you would need to write custom code to accomplish (which you could do in this case, but Orchard can handle it out of the box)
Hope this helps!
Two ways to do this:
http://orchardproject.net/docs/Creating-lists.ashx and http://orchardproject.net/gallery/List/Modules/Orchard.Module.Contrib.Taxonomies

Resources