Hi,
I created a custom payment method based the tutorial on
http://code.tutsplus.com/tutorials/crea ... -cms-22393
But during testing I realized there is an issue with the description of how the order status' are set up as saving a default status in admin or selecting the status in the callback does not work.
I created a custom payment method based the tutorial on
http://code.tutsplus.com/tutorials/crea ... -cms-22393
But during testing I realized there is an issue with the description of how the order status' are set up as saving a default status in admin or selecting the status in the callback does not work.
The provided link demonstrates old ways on developing payment modules since the codes are for v1.5x of Opencart in addition that the extensions are loaded under the extension folder nowadays with the latest version release of Opencart.
As for the order statuses, when created the module, did you also implemented the dropdown options in the admin module form so that you must also select the order statuses event as compared to other payment modules and your order statuses options that must also be defined in your admin - > systems - > settings - > edit store page?
As for the order statuses, when created the module, did you also implemented the dropdown options in the admin module form so that you must also select the order statuses event as compared to other payment modules and your order statuses options that must also be defined in your admin - > systems - > settings - > edit store page?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Yes I did. Here are some scripts to illustrate what i mean:
following the code instructions, i have this script in the admin view
I cannot see a reference to how $mobile_money_order_status_id (undefined variable notice ) is created and how it can be referenced in the payment method callback when updating the order with a status
following the code instructions, i have this script in the admin view
Code: Select all
<select name="mobile_money_order_status_id" id="input-status" class="form-control">
<?php foreach ($order_statuses as $order_status) { ?>
<?php if ($order_status['order_status_id'] == $mobile_money_order_status_id) { ?>
<option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
That could be an issue already. Do you have an API documentation you could provide so to see how and when this variable for mobile must be used?I cannot see a reference to how $mobile_money_order_status_id (undefined variable notice ) is created and how it can be referenced in the payment method callback when updating the order with a status
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Hi,
What I have done for now is I removed the IF statement within the foreach. Now I can get the default status from the callback. My problem now is if I want to label the status as failed. does
If would be easier to use in the callback when I am setting up conditions for successful and unsuccessful orders
What I have done for now is I removed the IF statement within the foreach. Now I can get the default status from the callback. My problem now is if I want to label the status as failed. does
function accept as a parameter the text order status and not the order status id?addOrderhistory
If would be easier to use in the callback when I am setting up conditions for successful and unsuccessful orders
The addOrderHistory method has the order status ID into its parameter rather than a text string, which is the way it should be pretty much as capturing your text string from the order status ID can easily be achieved in order to know if there's a corresponding match. Another way to do it would be by querying the order status ID with your text string into a separated model file which can still return a true result if the API right before calling the addOrderHistory method officially as it must return identical string results compared to your Opencart order status for this the specific store. This can be verified within a simple IF statement.darth_danny wrote:Hi,
What I have done for now is I removed the IF statement within the foreach. Now I can get the default status from the callback. My problem now is if I want to label the status as failed. doesfunction accept as a parameter the text order status and not the order status id?addOrderhistory
If would be easier to use in the callback when I am setting up conditions for successful and unsuccessful orders

Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 3 guests