How to add a table to shopwares product detail page which lists all available variants for this product? - smarty

I'm trying to edit the .tpl of the article detail page in my shopware instance to be able to display a complete list of all available variants in a table view with a link in the last column to directly choose the listed variant.
https://shopware.demo2.sixhop.net/hoehenluft-abenteuer/fashion/herren/151/mi-pants-bacun?number=SW10151.5&c=5
So if there are two configuration possibilities like in this example: color and size, I would like to generate this table:
pants s green "link to variant"
pants m green "link to variant"
pants l green "link to variant"
pants xl green "link to variant"
pants xl green "link to variant"
pants s black "link to variant"
pants m black "link to variant"
pants l black "link to variant"
pants xl black "link to variant"
pants xl black "link to variant"
How can I get a list of available variants for a given base article? How is the link for this article being generated?
What I already did is to add a separate tab that can show the variant table then and some trial&error on generating the table. But simply connecting all variant possibilities will not give a good result, beacuse some variant possibilities may not be available. Therefore I would love to see an approach from the "get active variants"-perspective.

You could work with {$sArticle.sConfigurator}. But as you wrote this wouldn't be a good result and it depends on logic in the template.
If you are familiar with PHP I'd try to create an DetailSubscriber(Enlight_Controller_Action_PostDispatchSecure_Frontend_Detail) and get the variants from the article itself. After this you can assign the result to a variable like $sArticleVariants and print it in the frontend.

Related

How to sort product collection in shopify?

I have a problem with my shopify collection. in the theme only i have sort by date , name etc but i am looking for sorting through colour.
For example: I have a collection of product in Red, Blue, Pink, Black, and Brown colour. I want to sorting out these collection in Pink, Black, Brown, Red and Blue colour format.
Can anyone give me an idea how could i do this?
It could have changed, but the last time I checked, if you sorted your products in a collection using Shopify Admin, that would not reflect on your website. So a company asked me to fix that. I made an App where you could sort the elements in a collection, for example, by colour, and then once that was done, the products would show up in that order on your website.
If it turns out you still cannot sort products in a collection, send me a message and maybe I can install that old App on your store for a small fee.

What do the colors mean on VS Code Maps?

Created some code maps in Visual Studio 2013 to see if they help in any way. They're actually quite good. However, it has coloured various entities and I've no idea how it has decided what colour to use for what entity.
There are blue, dark purple and pink entities showing. At first glance, blue is interfaces and abstract classes, but not always, pink and purple I have no idea.
Second there are arrows connecting the entities which are also coloured and occassionally dotted. I've no idea what these are supposed to represent without actually looking at them. Again I need some sort of key.
Thank you
You can get the meaning of a block by looking at the symbol it contains. The colours can vary, you can change the colours also. What you should see is the symbols. Below is the list of symbols:
The links:
You can find this legend from the legend button on top of a codemap file. As you can see in the picture below.
There's a legend button in the upper right corner of the code map window (or there should be). Clicking that gives this (for C++):

Magento: Multiple Attributes with same (identic) values - inheritable?

I am about to set up an online store and I am kinda "testing" if magento fits my needs. I think I got the idea behind categorizing and attributing products. But I have a question to the attributes concerning products - or in detail: for configurable products.
Is it possible to "inherit" attribute values (options) from another existing attribute?
I'll give you an example to visualize my question:
Let's say we sell boxes. We would have three different types of boxes:
uni-color boxes ("box-color")
boxes with a seperate "top-color"
boxes with a special printing on it, which has its own color ("highlight color")
To assign colors to box type #1, I would have the possible values
black,
white,
orange.
Box type #2 might come as
black box / black top (it might seem redundant, but there is a difference to uni-colored boxes),
black box / white top,
black box / orange top,
white box / black top,
white box / white top,
white box / orange top,
and so on.
And finally, box type #3 might come as
black box / black top / black highlight,
black / white / orange,
black / black / white,
etc.
I think you get the idea.
I would like to have one attribute of color-options which I would maintain (like add new colors, delete old ones, etc.) - and use it as all three different types of configurable color sets.
To be able to create configurable products I would add the color-attribute to my special "boxes" attribute set(s). But when it comes to the two-colored-boxes, I am not able to add the color attribute a second time.
Is there any other (simple) way to achieve this? Since I am new to Magento I would not like to dig too deep into the code or even want to develop a module (?).
Thanks in advance, I appreciate your answers :-)

Configurable Products - Change Dropdown based on first dropdown selection

I need to set up a product that is very similar to a configurable product but where the options can change depending on the attribute that has been selected. For instance, if I had the following attributes Size and Colour. Lets say I had small, medium, large for the size attribute. On my product, red is only available in the medium size but green and blue are available in all sizes. I would need the colour drop down box to change based on the selection of the size drop down.
Is this possible?
Note: I know this isn't strictly a programming question but I have seen a lot of other "setup" questions about magento on SO that haven't been closed so assume this appropriate.
You can use Configurable prodcuts to do this for you. Configurable products will only allow the user to select variations you have setup in the store.
for example:
If you have a configurable prodcut with Size and Colour Attributes, and add variations as follows:
Size: S, M, L
Colour: Red, Blue
You then only add (and enable/make in stock) Variations (simple child products) with combinations where Red is available in S,M only, and Blue is abailable in size L.
When a user tries to buy the product they will be asked to select a size, if they then select Size: S then the Colour dropdown will dynamically change to only allow the user to select Red as an option.

Magento - Multiselect color attribute

is it possible to create products in Magento with one or more colors ? For example a T-shirt can be "red", "white" or/and "red and white" (composed with 2 or more colours) ??
I want to have a multiselect in the color attribute and not only one colour in a list box.
Is that possible ?
Can't you make one of the simple products of your configurable product have "red/white" as color? In your example, you'd create 3 simple product, 1 red, 1 white, 1 red and white.
Then you join them in 1 configurable product, and so in the frontend you'd have 1 simple select with the 3 options, red, white and "red and white".
I know this is not exactly what you're asking, but maybe it would suit your need, and this way you don't have to write a module.
Hope that helps

Resources