- Posts: 62
- Thank you received: 0
Wrap the articles as a gift
- joostbloom
-
Topic Author
- Offline
-- Joomla version -- : 2.5.24
In my shop there is the possibilty to wrap the articles as a gift. The costs are 1 euro. With the customfield in the table order, is it possible to add an extra field (checkbox) in the checkout with the question 'do you want the articles wrapped as a gift?'. The only problem is that when someone checks this the cart total should be added with 1 euro. How can I do this?
regards,
Joost
Please Log in or Create an account to join the conversation.
You will have to do a plugin for that.
Based on the function "onAfterCartShippingLoad()", create an object like that:
You can see how it's working in the "plugins/hikashoppayment/userpoints/userpoints.php" file.
Here is some developer documentation:
hikashop.com/support/support/documentati...r-documentation.html
Please Log in or Create an account to join the conversation.
- joostbloom
-
Topic Author
- Offline
- Posts: 62
- Thank you received: 0
I have spend time to get it working but it's a pity... not working. I have got the checkbox in the cart-part. So that's ok. The column name in the ' custom fields' is called 'artikelenalskadoinpakken '.
I have got the following code in my plugin, but there must be something wrong... Can you please help me, make it working?
regards,
Joost
Please Log in or Create an account to join the conversation.
Please try that code instead:
Please Log in or Create an account to join the conversation.
- joostbloom
-
Topic Author
- Offline
- Posts: 62
- Thank you received: 0
Unfortunately it isn't working. When I check the checkbox 'artikelenalskadoinpakken' nothinh happened. So there is not 1 euro added to the cart....
Help!
regards,
Joost
Please Log in or Create an account to join the conversation.
For sure it's not working ; that's not the way to read the value of an order custom field.
Please understand that it going away from the support we are providing for HikaShop.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- joostbloom
-
Topic Author
- Offline
- Posts: 62
- Thank you received: 0
I understand that I am asking a lot. If you want me to pay for the excellent support, no problem! I want this get it working as soon as possible.
For now it is still not working. When I select/deselect the checkbox no change in the cart...
regards,
Joost
Please Log in or Create an account to join the conversation.
When I wrote the plugin I test it in my local website and it's working fine.
The problem is not in the code.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- joostbloom
-
Topic Author
- Offline
- Posts: 62
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Your custom field does not have values (Waarde) for the element.
So even if the user check the checkbox, the value behind will be empty, so no possibility to know if the user have check or not the custom field.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- joostbloom
-
Topic Author
- Offline
- Posts: 62
- Thank you received: 0
I had also tried it before with a value of '1' but also then there is no change in the cart. Maybe you can check it yourself: I can sent you superadmin credentials.
Regards,
Joost
Please Log in or Create an account to join the conversation.
It should work.
Are you really sure that the plugin is right installed and published in your website ?
I do not found it in the Joomla plugin manager.
Please understand that it going away from the support we are providing for HikaShop.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- joostbloom
-
Topic Author
- Offline
- Posts: 62
- Thank you received: 0
I have install it again and it was visible in the pluginmanager, but the site didn't work then at all... It makes me nuts.... How much will it cost to let you fix this? And how can we arrange this?
regards,
Joost
Please Log in or Create an account to join the conversation.
Your plugin won't work ; It has wrong category+name regarding his classname.
docs.joomla.org/J3.x:Creating_a_Plugin_for_Joomla
If you want ask for custom job, please use the "contact us" form.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.