Creating donate item

  • Posts: 21
  • Thank you received: 1
12 years 7 months ago #49861

I would like to use Hikashop to create a donate item where the client can put the amount into a form instead of having the item amount set. Is this possible?

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

  • Posts: 12953
  • Thank you received: 1778
12 years 7 months ago #49897

Hello sluiting,

Yes it's possible with this plugin, you'll have to :

- create a category named donation
- 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 texte
- set the "default value" to 0
- add the donation category

- add the custom price plugin and enable it.

Hope this will help you a little :).

Attachments:
The following user(s) said Thank You: sluiting, cb75ter

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

  • Posts: 83023
  • Thank you received: 13403
  • MODERATOR
12 years 7 months ago #49930

Note that custom fields of the table "item" are only available in the Business edition.

The following user(s) said Thank You: Mohamed Thelji

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

  • Posts: 21
  • Thank you received: 1
12 years 7 months ago #49977

I have enabled it and set the values and yet it doesn't tally up the total. This is a screen grab of what it does after I add the amount.

The other screen grab is how it displays initially which is great except for that "free" text. How do I get rid of that?

Thanks so much for your help by the way.

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
12 years 7 months ago #50001

Hello,

1. To don't show the "Free" price at the product page you'll have to :

- go to "Hikashop -> System -> Configuration -> Langage"
- edit the "English (United Kingdom)" langage file
- set the FREE_PRICE="Free" to FREE_PRICE="" and save

2. regarding the total price, can you tell me if you enabled the plugin ?

- go to "Extensions -> Plug-in Manager"
- search the "HikaShopCustom Price plugin"
- and set the status to enable

3. if you are just "sending" donation product, you should :

- go to "Hikashop -> system -> configuration -> display"
- set the "Display the quantity field on the product page" field to No Display

Hope this will help you.

Last edit: 12 years 7 months ago by Mohamed Thelji.
The following user(s) said Thank You: sluiting

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

  • Posts: 21
  • Thank you received: 1
12 years 7 months ago #50175

Thanks for the quick response. I have enabled the plugin but I did that after I created the donation product. Should I delete the product and start over? I also made the category the name donations. Are the names category specific to the plugin? Should it be donation and donation item?

I assume once the plugin is enabled I don't do anything in HikaShop to also enable it in the admin system?

I'm probably making this more complicated than it needs to be.

Last edit: 12 years 7 months ago by sluiting.

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

  • Posts: 21
  • Thank you received: 1
12 years 7 months ago #50184

I've changed the category to Donation but see in the Categories section that I can assign this to a category and so the name shouldn't matter.
The plugin is adding the amount but when I go to checkout I see no Total Price and the Final Total is still zero.

I'm using Joomla 2.5. The plugin is enabled.

Attachments:
Last edit: 12 years 7 months ago by sluiting. Reason: Add screen grab

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

  • Posts: 43
  • Thank you received: 1
12 years 7 months ago #50255

Hello,

Thank you for this plugin. For information, I'm in the same case as Sluiting, it doesn't work properly. The symptoms are the same.
I'd be interested also in some help. I can give a back end access if needed.

Regards

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

  • Posts: 21
  • Thank you received: 1
12 years 7 months ago #50305

My assumption is that the store was updated to 2.5 but not the donation plugin.

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

  • Posts: 83023
  • Thank you received: 13403
  • MODERATOR
12 years 7 months ago #50370

Please do a screenshot of your custom field options screen. You must be missing something in it.

The following user(s) said Thank You: sluiting, cb75ter

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

  • Posts: 43
  • Thank you received: 1
12 years 7 months ago #50384

Hello Nicolas,

Here is the screen shot.

Thank you for your assistance.

Attachments:

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

  • Posts: 43
  • Thank you received: 1
12 years 7 months ago #50438

Hello,

We looked the php code of the plugin, and are suprised by it.
Indeed, there is a closing embrace "}" on line 4, so the two other functions are out the plugin (?).
Moreover, there is no call of Joomla event like "onAfter"...

Is it normal ?

Last edit: 12 years 7 months ago by cb75ter.

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

  • Posts: 21
  • Thank you received: 1
12 years 7 months ago #50442

Here are my screen grabs of the setup. Please let me know if the configuration looks wrong. capture is the custom field screen and capture2 is the product setup.

Attachments:
Last edit: 12 years 7 months ago by sluiting. Reason: More details

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

  • Posts: 83023
  • Thank you received: 13403
  • MODERATOR
12 years 7 months ago #50491

It's normal that the code is done like that, don't worry :)

Your settings look fine. Could you double check that the plugin is enabled in the joomla plugins manager ?

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

  • Posts: 43
  • Thank you received: 1
12 years 7 months ago #50513

Nicolas,

It seems to be published :)

Attachments:

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

  • Posts: 21
  • Thank you received: 1
12 years 7 months ago #50548

Mine is published also and not totaling the price. I hate to sound frustrated but could you please look at this plugin instead of assuming we haven't configured this?
Again, I'm using Joomla 2.5.

Thanks.

Attachments:

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

  • Posts: 83023
  • Thank you received: 13403
  • MODERATOR
12 years 7 months ago #50592

From what I can see if you set a price of 0 in the product, it won't work.
You need to either set a price in it, or add the code:

if(empty($product->prices)){
		$price= null;
		$price->price_currency_id = hikashop_getCurrency();
		$product->prices = array($price);
	}
after the line
$currencyClass = hikashop_get('class.currency');
in the plugin file.

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

  • Posts: 43
  • Thank you received: 1
12 years 7 months ago #50644

Hello,

I tried both solutions, adding a price to the product and adding the code to the plugin, but none of them work.
Nicolas, have you tried the plugin by yourself and does it work by your side ? Is it an "official" Hikashop Plugin ?

Thank you in advance for your answer.

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

  • Posts: 83023
  • Thank you received: 13403
  • MODERATOR
12 years 7 months ago #50717

Yes, it works for me. I of course tried it and it works.
It's an official plugin.
I created a page on the demo website in order to show you:
demo.hikashop.com/index.php?option=com_h...show&cid=214&lang=en

That page will be available within one or two hours after my post, when the demo website is reset.

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

  • Posts: 43
  • Thank you received: 1
12 years 7 months ago #50862

Hello Nicolas,

Thanks for the demo. Knowing that it may work is important :)
The question now is "How ?" and I will investigate.

I'll be back in case of success.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum