Post by scanreg » Fri Oct 14, 2011 12:31 am

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?')

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by scanreg » Mon Oct 24, 2011 10:56 pm

btw, this would be extra cool for sending out custom job quotes, too

"here's your quote, just click the link to pay"

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by mberlant » Mon Oct 24, 2011 11:35 pm

This could also provide some legal cover that your admin change truly was authorized by the customer.

Please use proper English at all times, so that all members may understand you.


User avatar
Active Member

Posts

Joined
Sun Mar 13, 2011 8:33 pm

Post by scanreg » Sat Feb 09, 2013 1:02 am

any possibility for this, any extension that could do this? so far no luck finding any extension

thanks

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by aldoanizio » Tue Feb 26, 2013 8:12 pm

Give a Look Into My Code.

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>
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.

Newbie

Posts

Joined
Tue Feb 26, 2013 7:47 pm

Post by scanreg » Tue Feb 26, 2013 10:14 pm

nice

can admin allow customers to choose a payment method ?

thanks

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am
Who is online

Users browsing this forum: No registered users and 5 guests