- Posts: 259
- Thank you received: 22
Donation Plugin
- rodfarrell
-
Topic Author
- Offline
Less
More
13 years 3 months ago #109804
by rodfarrell
Donation Plugin was created by rodfarrell
I'm really struggling to get my head around how the custom proice plugin works. I have a Fabrik form that generates a product price that is represented by $this->data
How do I pass this figure into the custom price field that I have linked to a product?
How do I pass this figure into the custom price field that I have linked to a product?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 3 months ago - 13 years 3 months ago #109822
by Mohamed Thelji
Replied by Mohamed Thelji on topic Donation Plugin
Hi,
Here is the custom price plugin, if you want to use is 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 .
Here is the custom price plugin, if you want to use is 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 .
Last edit: 13 years 3 months ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
Less
More
- Posts: 259
- Thank you received: 22
13 years 3 months ago - 13 years 3 months ago #109961
by rodfarrell
Replied by rodfarrell on topic Donation Plugin
Sorry, I don't understand how that gets the data from the Fabrik form? I've done all of the above but what changes in the code need to be made for the field value in Fabrik to be passed to the amount field in the product?
Last edit: 13 years 3 months ago by rodfarrell.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 3 months ago #110008
by Mohamed Thelji
Replied by Mohamed Thelji on topic Donation Plugin
Ok, Can you show me where your "Fabrik form" is ?
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
Less
More
- Posts: 259
- Thank you received: 22
13 years 3 months ago #110489
by rodfarrell
Replied by rodfarrell on topic Donation Plugin
Sorry for the delay. I've been moving the site to a live server for you to see.
www.trueerp.co.uk/licenses/
The "Addjusted Price with Training" is the amount to be passed into the shopping Cart
The "Addjusted Price with Training" is the amount to be passed into the shopping Cart
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 3 months ago #110498
by Mohamed Thelji
Replied by Mohamed Thelji on topic Donation Plugin
Ok, the problem is coming from the fact that you'll have to do it through a product page which is in the "donation" category.
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
Less
More
- Posts: 259
- Thank you received: 22
13 years 3 months ago #110637
by rodfarrell
Replied by rodfarrell on topic Donation Plugin
Sorry Mohamed but I'm at a loss as to what you are trying to say. I've changed the name of both the product and category to Donation but I can't see how that helps get the amount from the form variable into the amount field in the donation product.
Please Log in or Create an account to join the conversation.
13 years 3 months ago #110707
by Xavier
Replied by Xavier on topic Donation Plugin
Hi,
As Mohamed said, I think that you have to move your Fabrik form that generates a product price in a product page (the Donation product page) by editing the view "product / show_default".
If it's a module, just add it with a loadmodule (joomla function) and then when the price is updated in your Fabrik form, update the value of the custom field in the product page.
Make this field not editable by the user, by this way when the Fabrik form price change, you change the value of the custom field.
As Mohamed said, I think that you have to move your Fabrik form that generates a product price in a product page (the Donation product page) by editing the view "product / show_default".
If it's a module, just add it with a loadmodule (joomla function) and then when the price is updated in your Fabrik form, update the value of the custom field in the product page.
Make this field not editable by the user, by this way when the Fabrik form price change, you change the value of the custom field.
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
Less
More
- Posts: 259
- Thank you received: 22
13 years 3 months ago #110828
by rodfarrell
Replied by rodfarrell on topic Donation Plugin
"when the price is updated in your Fabrik form, update the value of the custom field in the product page"
That's the bit I am asking about. How do I do that?
That's the bit I am asking about. How do I do that?
Please Log in or Create an account to join the conversation.
13 years 3 months ago #110888
by nicolas
Replied by nicolas on topic Donation Plugin
When the user click on the "purchase now" button of your fabrik form, you need to redirect the user to the add to cart HTML link of your product like that:
www.trueerp.co.uk/index.php?option=com_h...=1&product_id=2&data [item][amount]={amount}
and replace {amount} by the amount that fabrik gives you.
That will automatically add the product to the cart with the amount that fabrik calculated and display the checkout to the user.
www.trueerp.co.uk/index.php?option=com_h...=1&product_id=2&data [item][amount]={amount}
and replace {amount} by the amount that fabrik gives you.
That will automatically add the product to the cart with the amount that fabrik calculated and display the checkout to the user.
Please Log in or Create an account to join the conversation.
Time to create page: 0.251 seconds