date option for click&collect

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
GülsümAkça
Posts: 57
Joined: 20 Nov 2020, 13:30

date option for click&collect

Post by GülsümAkça » 26 Oct 2021, 16:30

I want to add date option for click&collect option on checkout page. How can I do it?
Last edited by GülsümAkça on 28 Oct 2021, 08:18, edited 2 times in total.

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

Re: date option for click&collect

Post by aimeos » 27 Oct 2021, 12:54

Implement a service decorator for displaying the date like the one for the time:
https://github.com/aimeos/aimeos-core/b ... r/Time.php

We would love to merge your code into the core if it's ready :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
GülsümAkça
Posts: 57
Joined: 20 Nov 2020, 13:30

Re: date option for click&collect

Post by GülsümAkça » 04 Nov 2021, 08:21

This is how I added the date option thanks:
Screenshot_20.jpg
Screenshot_20.jpg (53.99 KiB) Viewed 1476 times

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

Re: date option for click&collect

Post by aimeos » 05 Nov 2021, 07:35

Cool! Can you create a pull request with your code? We would love to get your feature into the core :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
GülsümAkça
Posts: 57
Joined: 20 Nov 2020, 13:30

Re: date option for click&collect

Post by GülsümAkça » 05 Nov 2021, 09:20

This feature has already been developed by aimeos. :)
\vendor\aimeos\aimeos-core\lib\mshoplib\src\MShop\Service\Provider\Decorator\Date.php
I just added "date" to the providers . then I added the "date.minimumdays" to the option.

There is just one problem. The error is only displayed in English because the translate command is not added here
Screenshot_24.jpg
Screenshot_24.jpg (74.3 KiB) Viewed 1463 times

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

Re: date option for click&collect

Post by aimeos » 06 Nov 2021, 14:48

Use this instead and create a PR, then we will merge it into the core:

Code: Select all

$result['date.value'] = sprintf( $this->getContext()->translate( 'mshop', 'Date value before "%1$s"' ), $minimum );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply