Storing a date for an attribute
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Storing a date for an attribute
Hi there,
I have an attribute which has a date, e.g. the attribute is "red" and the date field is "delivery from". So, when the user sees the color red, then he gets a notifying text that this color is available from that date.
When I look at the attribute, I can provide a Text field with (my) type "Delivery from". However, the date should be formatted differently, depending on the language of the shop.
So, is it best to fill the "Delivery from" field in the different language formats during the import? Or is there a way to tell aimeos that this is actually a date field and aimeos silently formats this date correctly, depending on the language?
Claudia
I have an attribute which has a date, e.g. the attribute is "red" and the date field is "delivery from". So, when the user sees the color red, then he gets a notifying text that this color is available from that date.
When I look at the attribute, I can provide a Text field with (my) type "Delivery from". However, the date should be formatted differently, depending on the language of the shop.
So, is it best to fill the "Delivery from" field in the different language formats during the import? Or is there a way to tell aimeos that this is actually a date field and aimeos silently formats this date correctly, depending on the language?
Claudia
Re: Storing a date for an attribute
Not the color "red" has a delivery date but the article with the variant attribute. The stock items for the products already have a "back in stock" date and in the standard setup, it's already used for exactly what you want
Here you can also format that date as you need it:
[url]https://github.com/aimeos/ai-clien ... rd.php#L96[/url]
Here you can also format that date as you need it:
[url]https://github.com/aimeos/ai-clien ... rd.php#L96[/url]
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Storing a date for an attribute
Sorry, the example with "delivery date" was misleading. The dates which I would like to provide for the attribute actually have nothing to do with the delivery date of the item.
Let's see if I can make this clear with another example:
The products are T-Shirts which have an attribute depending on the event for which they are produced.
One of these attribute values is "Festival A" and I would like to store the start and end date of "Festival A" at the attribute.
So, when a user selects a T-Shirt for "Festival A", I would like to display these start and end dates, in the format depending on the language of the user.
Let's see if I can make this clear with another example:
The products are T-Shirts which have an attribute depending on the event for which they are produced.
One of these attribute values is "Festival A" and I would like to store the start and end date of "Festival A" at the attribute.
So, when a user selects a T-Shirt for "Festival A", I would like to display these start and end dates, in the format depending on the language of the user.
Re: Storing a date for an attribute
The easiest way might be to use articles of type "event" with their start and end date. You can also configure them to be available after the end date: https://github.com/aimeos/aimeos-core/b ... #L282-L298
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star