If admin creates an order, would be great if a link could go out to the customer that they click to pay
This could relate to full orders or even add-ons later (like when a customer calls in and says 'hey, i forgot X, could you add it to my order?')
This could relate to full orders or even add-ons later (like when a customer calls in and says 'hey, i forgot X, could you add it to my order?')
Give a Look Into My Code.
I've made with VqMod.
You can Adjust to your needs. In My Case this code works in the Order History area and by email when the customers make an order.
In my case after the callback&order_id= in the link i have to add the order id encripted for an specific payment method that we have in Brazil. But in other cases you can pass just que order id without encription to the link or passe the correct link for each payment method.
I Think this could help. Any questions please post here.
Regards From Brazil.
I've made with VqMod.
Code: Select all
<file name="catalog/model/account/order.php">
<operation error="skip">
<search position="after"><![CDATA[
'payment_method' => $order_query->row['payment_method'],
]]></search>
<add><![CDATA['payment_code' => $order_query->row['payment_code'],]]></add>
</operation>
<operation error="skip">
<search position="after"><![CDATA[
$template->data['payment_method'] = $order_info['payment_method'];
]]></search>
<add><![CDATA[
$template->data['payment_code'] = $order_query->row['payment_code'];
]]></add>
</operation>
</file>
<file name="catalog/model/checkout/order.php">
<operation error="skip">
<search position="after"><![CDATA[
'payment_method' => $order_query->row['payment_method'],
]]></search>
<add><![CDATA['payment_code' => $order_query->row['payment_code'],]]></add>
</operation>
<operation error="skip">
<search position="after"><![CDATA[$template->data['order_id'] = $order_id;]]></search>
<add><![CDATA[
$this->load->library('encryption');
$encryption = new Encryption($this->config->get('config_encryption'));
$template->data['order_id_encryption'] = $encryption->encrypt($order_id);
]]></add>
</operation>
<operation error="skip">
<search position="after"><![CDATA[
$template->data['payment_method'] = $order_info['payment_method'];
]]></search>
<add><![CDATA[
$template->data['payment_code'] = $order_info['payment_code'];
]]></add>
</operation>
</file>
<file name="catalog/controller/account/order.php">
<operation error="skip">
<search position="after"><![CDATA[
$order_info = $this->model_account_order->getOrder($order_id);
]]></search>
<add><![CDATA[
$this->load->library('encryption');
$encryption = new Encryption($this->config->get('config_encryption'));
$this->data['order_id_encryption'] = $encryption->encrypt($order_id);
]]></add>
</operation>
<operation error="skip">
<search position="after"><![CDATA[
$this->data['payment_method'] = $order_info['payment_method'];
]]></search>
<add><![CDATA[
$this->data['payment_code'] = $order_info['payment_code'];
]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/account/order_info.tpl">
<operation error="skip">
<search position="before" offset="1"><![CDATA[
<div class="buttons">
]]></search>
<add><![CDATA[
<?php if ( ($payment_code == "payment_code) && ($histories[(sizeof($histories) - 1)]['status'] == "Desired Waiting Status") ) : ?>
<h2>Finish Payment</h2>
<table class="list">
<thead>
<tr>
<td class="left">Payment Method</td>
<td class="left">Action</td>
</tr>
</thead>
<tbody>
<tr>
<td class="left"><?php echo $payment_method; ?></td>
<td class="left"><a href="index.php?route=payment/payment_code/callback&order_id=<?php echo $order_id_encryption; ?>" target="_blank">Payment Link / Rebillet Link</a></td>
</tr>
</tbody>
</table>
<?php endif; ?>
]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/mail/order.tpl">
<operation>
<search position="before"><![CDATA[
<p style="margin-top: 0px; margin-bottom: 20px;"><?php echo $text_footer; ?></p>
]]></search>
<add><![CDATA[
<?php if ( ($payment_code == "payment_code") ) : ?>
<table style="border-collapse: collapse; width: 100%; border-top: 1px solid #DDDDDD; border-left: 1px solid #DDDDDD; margin-bottom: 20px;">
<thead>
<tr>
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: left; padding: 7px; color: #222222;">Finish Payment</td>
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: left; padding: 7px; color: #222222;">Action</td>
</tr>
</thead>
<tbody>
<tr>
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;"><?php echo $payment_method; ?></td>
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;"><a href="<?php echo $store_url; ?>index.php?route=payment/payment_code/callback&order_id=<?php echo $order_id_encryption; ?>">Payment Link / Rebillet Link</a></td>
</tr>
<tr><td colspan="2" style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: justify; padding: 7px;">If your Order has been payed please desconsider this field.</td></tr>
</tbody>
</table>
<?php endif; ?>
]]></add>
</operation>
</file>
In my case after the callback&order_id= in the link i have to add the order id encripted for an specific payment method that we have in Brazil. But in other cases you can pass just que order id without encription to the link or passe the correct link for each payment method.
I Think this could help. Any questions please post here.
Regards From Brazil.
Who is online
Users browsing this forum: No registered users and 5 guests