Donations

  • Posts: 32
  • Thank you received: 0
7 years 6 months ago #129415

My client just purchased the business version.

How do we go about setting up donations? Where use can enter an amount info a field.

I saw references to a plugin but I do not see it when searching Plugins in the backend.

Please Log in or Create an account to join the conversation.

  • Posts: 12786
  • Thank you received: 1757
  • MODERATOR
7 years 6 months ago #129464

Hi,

You'll find more information through this thread :

You'll find it through your plug-in manager with the name "HikaShop Donation plugin".
If you want to configure it you'll just have to :

create a category named "donation" for example
- create a product named "donation" set the price to 0 and the category to "donation"

- go to "Hikashop -> Display -> Custom fields"
- create a new field
- set the "label" field to amount
- set the "table" field to item
- set the "Column name" field to amount
- set the "field type" to text
- set the "default value" to 0
- add the donation category

- enable the "HikaShop Donation plugin".

Please Log in or Create an account to join the conversation.

  • Posts: 345
  • Thank you received: 23
1 month 2 weeks ago #331156

Hi guys, Please:
1 - Are these instructions on Donation setting up still valid / up to date ?
2 - Is the creation of the "Donations" Category mandatory ?
3 - Is there a way to create "Donations Campaigns" ? I'm thinking something like to show the meta goal near the amount (it can be also into the description) and the total amount reached (in % is okay) till that moment (this is really too important)

Last edit: 1 month 2 weeks ago by joomleb.

Please Log in or Create an account to join the conversation.

  • Posts: 72763
  • Thank you received: 11096
  • MODERATOR
1 month 2 weeks ago #331175

Hi,

1. Yes.

2. No, it's not mandatory at all.

3. Well, there is no such mechanism. You could have a custom product field where you would enter the percentage accomplished already and update it manually periodically.

Please Log in or Create an account to join the conversation.

  • Posts: 345
  • Thank you received: 23
1 month 2 weeks ago #331213

Hi Nicolas,
thanks for the quick answer...

3 - A PHP Custom Field could solve this and other needs, no ?!?

Please Log in or Create an account to join the conversation.

  • Posts: 72763
  • Thank you received: 11096
  • MODERATOR
1 month 2 weeks ago #331218

Hi,

3. Not really. This link is for Joomla custom fields, not HikaShop custom fields. So what this article talks about is not possible here.
However, you can do something quite similar. You could develop a plugin implementing the "fields API" from HikaShop ( www.hikashop.com/support/documentation/6...entation.html#fields ) in order to add your own type of custom fields in HikaShop. And you could have it so that it would calculate the percentage dynamically when displaying it on the product page in the code of the plugin.
So it's similar to what you found but instead of putting the PHP code in the interface of the backend, you need to put it in a plugin.

Please Log in or Create an account to join the conversation.

  • Posts: 345
  • Thank you received: 23
1 month 2 weeks ago #331253

Hi Nicolas,
3 - Many Thanks for your suggestion. I meant that an HikaShop PHP Custom Field could be useful in many situations as a "last solution"...

In my specific case, the HikaShop Donation plugin, I think that should be included a "goal field", as I described, by using it... it is really a missing feature...

PS - Wouldn't it be time to switch to / add the default Joomla Custom Fields integration ? (More integration for HikaShop and less work for you)

Last edit: 1 month 2 weeks ago by joomleb.

Please Log in or Create an account to join the conversation.

  • Posts: 72763
  • Thank you received: 11096
  • MODERATOR
1 month 2 weeks ago #331266

Hi,

Well, I understand what you mean, but from experience, I don't see many uses for that.
Here for example, doing what you want requires at least getting information on the current product, running a MySQL query and some processing on the results of the query to be able to display the percentage. So yo'ure looking at at least a dozen lines of code.
If you know how to do that in Joomla, you likely already know how to put up a Joomla plugin (a xml with 10 lines, and a PHP file with a few lines). So as a developer you should be able to easily put up a plugin together to do that and it wouldn't take you much longer than just writing your PHP code in a PHP custom field.
What's more, usually, when you want to customize custom fields, you want to extend from an existing custom field type. That way, it simplifies the code you need a lot.

Having a "goal" option in the donation plugin is a good idea. I'll note that on our todo list.

Regarding supporting Joomla custom fields, I've looked at it in the past, and it's not practical. HikaShop doesn't use Joomla's model system because it didn't exist when HikaShop was created. Also, the structure of the custom fields in Joomla is quite different from what we have in HikaShop. We would basically have to rewrite a big part of how HikaShop works. And the gain are not that important since most of the things you can do with the Joomla custom field types can also be do with HikaShop's custom field types.

The following user(s) said Thank You: joomleb

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum