adding an additional attribute type in backend

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
h.mohamed
Posts: 5
Joined: 05 Dec 2019, 13:29

adding an additional attribute type in backend

Post by h.mohamed » 05 Dec 2019, 13:47

Hello everyone,
i'm new here while i'm testing the aimeos-admin and i need help in this issue...

how can i add a new/ additional attribute-type for a product in backend?
for example: Type = Format
Attribute= DIN A4 | DIN A8 etc.

thanks in advance for your support,
Hany

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: adding an additional attribute type in backend

Post by aimeos » 06 Dec 2019, 08:41

In the left navbar (extended view), there's a "Type" entry with a list of possible type domains. You need to add yours in "Attribute".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

h.mohamed
Posts: 5
Joined: 05 Dec 2019, 13:29

Re: adding an additional attribute type in backend

Post by h.mohamed » 06 Dec 2019, 09:41

Hi there,

many thanks for your response.
would you tell me please in which class can i adapt the attributes types as well with more complexed specifications?
otherwise, why wouldn't my language or filtering configuration not be saved for the next login?

thanks and regards,
Hany

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: adding an additional attribute type in backend

Post by aimeos » 06 Dec 2019, 13:54

What does this mean? Can you please explain in more detail?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

h.mohamed
Posts: 5
Joined: 05 Dec 2019, 13:29

Re: adding an additional attribute type in backend

Post by h.mohamed » 06 Dec 2019, 14:14

i need to know where in the code (which class) can i extand/ adapt the attributes types to order to be able for developing our complexed pruduct attributes like here: https://www.europadruckerei.de/Flyer--D ... ,3565.html

where to find the controllers, view-templates and models in this case for the attributes-types?
or do you have a developer documentation for me ?

Thnaks and regards

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: adding an additional attribute type in backend

Post by aimeos » 07 Dec 2019, 10:29

The Aimeos faceted search is based on attribute IDs, so there's no class behind which does some more complex stuff. For your example link, create those eight attribute types (Product, Format, etc.) and the corresponding attributes for each type (for Product: Flyer, Folder, etc.).

How the attribute types are displayed is determined by configuration and the template that renders the HTML code:
https://github.com/aimeos/ai-client-htm ... p#L99-L176
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

h.mohamed
Posts: 5
Joined: 05 Dec 2019, 13:29

Re: adding an additional attribute type in backend

Post by h.mohamed » 09 Dec 2019, 13:26

Many thanks.
Now i have another questions as following..
01) where to find seeding templates for updating DB-tables as well?
02) how can i set the prices of an article dependencly on the added/ configured attributes?
03) what are the [Option:Value] in the configuration for? how can i use it and with which parameters?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: adding an additional attribute type in backend

Post by aimeos » 10 Dec 2019, 10:50

h.mohamed wrote: 09 Dec 2019, 13:26 01) where to find seeding templates for updating DB-tables as well?
You can find the Doctrine DBAL schemas here:
https://github.com/aimeos/aimeos-core/t ... ult/schema

If you want to extend or add tables, please read these articles:
https://aimeos.org/docs/Developers/Library/Setup_tasks
h.mohamed wrote: 09 Dec 2019, 13:26 02) how can i set the prices of an article dependencly on the added/ configured attributes?
Add prices to the attributes. They will be added to the total price automatically.
h.mohamed wrote: 09 Dec 2019, 13:26 03) what are the [Option:Value] in the configuration for? how can i use it and with which parameters?
There you can store arbitrary key/value pairs you can use for everything you want, e.g. for adding custom CSS classes.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

h.mohamed
Posts: 5
Joined: 05 Dec 2019, 13:29

Re: adding an additional attribute type in backend

Post by h.mohamed » 10 Dec 2019, 11:04

many thanks for your response!

regarding my second question, maybe i should explain my issue clearer...
going back to our product here: https://www.europadruckerei.de/Flyer--D ... 54163.html which i would implement in aimeos.
as you see there are many attributes which define the final price at the end, depending on what the customer wishs.
how can i implement/ define the pricing automatism in this case based on the wished various attributes?

For example: Falyer | 1 site | DIN A6 | 1/0 color scale | 500 pieces => Price = 140,00 €
alternative: Falyer | 1 site | DIN A4 | 4/0 color scale | 500 pieces => Price = 170,00 €
and so on ...

i see that the pricing could be configured at the backend only based on Minimum quantity!

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: adding an additional attribute type in backend

Post by aimeos » 11 Dec 2019, 09:43

You have add product prices and prices to attributes. Furthermore, products can be simple articles or selection products where the each variant article can have its own price.

Now it depends a bit on your price structure. What you can always do is to to create a unique variant article for all combinations, e.g.
- "Falyer | 1 site | DIN A6 | 1/0 color scale | 500 pieces" -> variant article price 140€
- "Falyer | 1 site | DIN A4 | 4/0 color scale | 500 pieces" ->variant article price 170€
That way each article contains the already calculated final price.
The variant attributes for the selection product "Falyer" will be
- 1 site
- DIN A6 and DIN A4
- 1/0 color scale and 4/0 color scale

That way, you have full controll over the price and there are no complicated rules and exceptions. The negative side is that you need to create a lot of variant articles (num sites * num size * num color scale -> for the three named variant dimensions).

If you have variant dimensions that have a fixed price (or only depends on the number of pieces), that it's easier to add that prices to the attributes, e.g. for color scale:
- 1/0 color scale: 500: 10€, 1000: 18€, ...
- 4/0 color scale: 500: 40€, 1000: 37.5€, ...
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply