Product Donations

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
peter69
Posts: 95
Joined: 09 Jun 2022, 19:31

Product Donations

Post by peter69 » 06 Jul 2022, 16:12

Hello!

I would like to know if it is possible to add a "Donate products" feature.

The idea is as follows, in the store there can be a button called "Donate". By clicking on the button customers will be redirected to a page listing products that have been enabled to be donated. In the checkout process the delivery function should be disabled (only debit card payment should be enabled).

The donated products will be delivered to needy families.

This is something that can be done in Aimeos?, I have some ideas to implement in the code but I would like to know your opinion about it.

Thank you very much for your help,

Best regards!

========================
laravel: 9.2
aimeos-laravel: ~2022.04
PHP: 8.1.6
Environment: Ubuntu 20.04.4 LTS

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

Re: Product Donations

Post by aimeos » 07 Jul 2022, 06:54

You should put all products which can be donated in one category. When the customer has added one of these products to the basket and enters the checkout process, you can use the "Category" service decorator to

a) hide all shipping options besides the one for "delivery to families"
b) show only credit card as payment option

Here's the documentation for the service decorator:
https://aimeos.org/docs/latest/manual/s ... /#category
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
peter69
Posts: 95
Joined: 09 Jun 2022, 19:31

Re: Product Donations

Post by peter69 » 12 Jul 2022, 21:58

Hello, thank you very much for your support.

In this case all products will be available for donation.

Therefore, I should probably just add an option in the checkout process called "donate" or "delivery to families".

What do you think about this approach?

Regards,

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

Re: Product Donations

Post by aimeos » 14 Jul 2022, 06:27

Yes, a shipping option "Donate" will be enough.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
peter69
Posts: 95
Joined: 09 Jun 2022, 19:31

Re: Product Donations

Post by peter69 » 26 Jul 2022, 16:05

Thank you very much!!!

User avatar
peter69
Posts: 95
Joined: 09 Jun 2022, 19:31

Re: Product Donations

Post by peter69 » 20 Sep 2022, 06:46

Hello,

I have created a product called "Donation", the idea is that customers can donate the amount of money they want. Therefore to this product I have created I have enabled the option "Allow custom price".

On the product page, there is a "custom price" field, but there is no option to add to cart.

What can I do or is there some part of the product creation that I have not yet configured?

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

Re: Product Donations

Post by aimeos » 21 Sep 2022, 07:02

Check if you have added a stock entry. You need one but the stock level can be empty so it will have unlimited stock.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
peter69
Posts: 95
Joined: 09 Jun 2022, 19:31

Re: Product Donations

Post by peter69 » 21 Oct 2022, 21:43

Hi Sir,

It only works if the product has been added/associated with at least one category.

Regards,

User avatar
peter69
Posts: 95
Joined: 09 Jun 2022, 19:31

Re: Product Donations

Post by peter69 » 28 Jan 2023, 21:58

Hello Aimeos,

I have created a service delivery called: "Delivery to families in need" to which I have assigned the provider I have created which is called: DeliveryToFamilies.

For this service delivery, I assigned the decorator that you recommended me to use: Category (in which I added the category "donation" in the option: category.include). However, when I try to perform the checkout process I get a Mariadb error:
Attachments
SQLSTATE-42000-Syntax-error-or-access-violation-1064-You-have-an-error-in-your-SQL-syntax-check-the-manual-that-corresponds-to-your-MariaDB-server-version-for-the-right-syntax-to-use-near-AND-mproli-id-IS-NOT-NULL-AND-mpro-id-.png
SQLSTATE-42000-Syntax-error-or-access-violation-1064-You-have-an-error-in-your-SQL-syntax-check-the-manual-that-corresponds-to-your-MariaDB-server-version-for-the-right-syntax-to-use-near-AND-mproli-id-IS-NOT-NULL-AND-mpro-id-.png (186.14 KiB) Viewed 1380 times

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

Re: Product Donations

Post by aimeos » 30 Jan 2023, 08:57

Can you share your error ("Share" button at the top)?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply