- Posts: 36
- Thank you received: 0
Cart page : add donation line
I put it in the beginning of the file and I have a error message when I confirm the command.
zupimages.net/viewer.php?id=15/50/yhg1.png
Please Log in or Create an account to join the conversation.
Please make sure that you use the exact same name as you've set in the column name of your custom field.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
It doesn't work.
If the column name 'donation' is set in the line 4 then this code should work no ?
Please Log in or Create an account to join the conversation.
So are you sure that you have something in
Because the rest of the code is definitely correct.
Please Log in or Create an account to join the conversation.
It's the value that the client put in the donation input in the command page.
I made another test.
$order->donation = 42;
but I have the same error where the donation column is unknown...
Please Log in or Create an account to join the conversation.
Otherwise, you won't be able to save anything in it.
Please Log in or Create an account to join the conversation.
I read again but I don't find how can I create it ?
Please Log in or Create an account to join the conversation.
Go in the menu Display>Custom fields, click on the "new" button and select the "order" choice in the "table" setting.
Note that this is only available with the Business edition of HikaShop.
Please Log in or Create an account to join the conversation.
To use it I just do for example
echo $order->donation;
?
I tried this in the order_status_notification file but it display nothing.
And to edit the total in the database I can use the previous code to modify it ?
Please Log in or Create an account to join the conversation.
<?php echo $order->cart->donation; ?>
in the HTML version of the email.
Normally, to have the total take it into account, you would have to develop a plugin like I said previously:
www.hikashop.com/forum/checkout/880481-c...ion-line.html#221354
Otherwise, it require code modifications a bit everywhere in order to take into account the donation.
Please Log in or Create an account to join the conversation.