Jump to content

POF email and confirmation


peterp

Recommended Posts

Hi All,

          I have a client that wishes to have entered on their admin pof order confirmation that the customer has used the Bank Transfer facility, in which case this will require the staff to change the status of this order to be processed and then they will be able print the order. Is there a way to print on the email between the message that states that pof order has been placed and the url for the order a message that states 'Paid by BANK TRANSFER'. At the moment when an order is paid by a banking api that accepts credit card payments it states on the order just under the note about the customer has just placed an order that the payment was via the bank api

I hope I have explained this adequately, I have tried to modifiy the email template but this was not successful so any help will be apreciated

Best Regards,

Peterp

 

 

Link to comment
Share on other sites

"At the moment when an order is paid by a banking api that accepts credit card payments it states on the order just under the note about the customer has just placed an order that the payment was via the bank api."

Really? Did you add that? I do not see it in my email templates.

I haven't tried this myself, but...

In the email template, add wording to include this variable: {$smarty.session['__basket']['gateway']}

 

Link to comment
Share on other sites

Hi Brian,

No I didn't add this it was done by the previous developer who I have taken over from. What I think I need is where do I change the $DATA.payment value from print_order_form to BANK TRANSFER

As you can see from the template below the red highlight is what I'm trying to change for what ever payment method is used.

Zippy Tie Man Tax Invoice
ABN 16505977418

Thank You {$DATA.first_name}!
        
        Your order {$DATA.cart_order_id} has been received which was placed on {$DATA.order_date}. Please keep this email for your records. It is possible to view the status of your order online.
        Paid By: {$DATA.gateway}
        {$DATA.link}
        
        ----------------------------------------------------------------------
        Billing address:
        {$BILLING.first_name} {$BILLING.last_name}
        {if !empty($BILLING.company_name)}{$BILLING.company_name}
        {/if}{$BILLING.line1}
        {if !empty($BILLING.line2)}{$BILLING.line2}
        {/if}{$BILLING.town}
        {$BILLING.state}
        {$BILLING.postcode}
        {$BILLING.country}
        {$BILLING.phone}
        
        Email:
        {$BILLING.email}
        
        Shipping address:
        {$SHIPPING.first_name} {$SHIPPING.last_name}
        {if !empty($SHIPPING.company_name)}{$SHIPPING.company_name}
        {/if}{$SHIPPING.line1}
        {if !empty($SHIPPING.line2)}{$SHIPPING.line2}
        {/if}{$SHIPPING.town}
        {$SHIPPING.state}
        {$SHIPPING.postcode}
        {$SHIPPING.country}
        
        ----------------------------------------------------------------------
        Items in Your Order
        
        {foreach from=$PRODUCTS item=product}
        -----------------------------------
        {$product.name}
        {$product.product_options}
        
        Part Number: {$product.product_code}
        Unit Price: {$product.price}
        Qty: {$product.quantity}
        
        {/foreach}
        -----------------------------------
        Subtotal: {$DATA.subtotal}
        Discount: {$DATA.discount}
        Shipping: {$DATA.shipping} {if $DATA.ship_method}({$DATA.ship_method}){/if}
        {foreach from=$TAXES item=tax}{$tax.tax_name} ({$tax.tax_percent}%): {$tax.tax_amount}
        {/foreach}
        --------------------------
       Tax Invoice Total: {$DATA.total}
        ==========================

Thanks again

Best Regards

Peterp

Link to comment
Share on other sites

I see.

Try this trick: In the POF's config.xml, change the <name> node CDATA from Print_Order_Form to BANK TRANSFER.

This makes several assumptions, a couple because I haven't checked with this particular module:

1. It is the name in the module's config that takes priority over the module's folder name.
2. (The folder name requires underscores and are dealt with, but) the name may not need underscores.
3. You have enabled Bank Transfer as the only option for this module. (Otherwise, might be confusing.)

I hope CubeCart has been coded everywhere to use the module name (as opposed to folder). If not, we may need to track that down.

Link to comment
Share on other sites

Hi Brian,

<?xml version="1.0" encoding="UTF-8"?>
<installer version="1.0">
  <info>
    <uid>[email protected]</uid>
    <type>gateway</type>
    <mobile_optimized>false</mobile_optimized>
    <name><![CDATA[Bank Transfers]]></name>
    <description><![CDATA[Print Order Form Payment Gateway]]></description>
    <version>1.0.1</version>
    <minVersion>5.0.0a</minVersion>
    <maxVersion>5.1.*</maxVersion>
    <creator><![CDATA[CubeCart]]></creator>
    <homepage><![CDATA[http://www.cubecart.com]]></homepage>
    <block>false</block>
  </info>
</installer>

I made this change but this still didn't work I have also made the change to module.definitions.xml as below

<?xml version="1.0" encoding="UTF-8"?>
<!--
 * CubeCart v6
 * ========================================
 * CubeCart is a registered trade mark of CubeCart Limited
 * Copyright CubeCart Limited 2014. All rights reserved.
 * UK Private Limited Company No. 5323904
 * ========================================
 * Web:   http://www.cubecart.com
 * Email:  [email protected]
 * License:  GPL-2.0 http://opensource.org/licenses/GPL-2.0
-->
<definitions version="1.0">
 <group name="print_order_form">
  <string name="address"><![CDATA[Address]]></string>
  <string name="bank_account"><![CDATA[Account Number]]></string>
  <string name="bank_account_name"><![CDATA[Account Name]]></string>
  <string name="bank_allow"><![CDATA[Allow bank transfers?]]></string>
  <string name="bank_name"><![CDATA[Bank Name]]></string>
  <string name="bank_sort"><![CDATA[Sort Code]]></string>
  <string name="bank_swift"><![CDATA[Swift/IBAN Code]]></string>  
  <string name="cards_accept"><![CDATA[Cards Accepted]]></string>
  <string name="cards_allow"><![CDATA[Allow Payment by Card?]]></string>
  <string name="cards_example"><![CDATA[Visa, Mastercard, American Express, Discover]]></string>
  <string name="cheque_allow"><![CDATA[Allow payment by cheque?]]></string>
  <string name="cheque_payable"><![CDATA[Cheques made payable to]]></string>
  <string name="currency_multi"><![CDATA[Allow Payment in Multiple Currencies?]]></string>
  <string name="module_title"><![CDATA[Bank Transfers]]></string>
  <string name="notes"><![CDATA[Notes to customer]]></string>
  <string name="confirmation_email"><![CDATA[Send order confirmation email?]]></string>
  <string name="title_bank_transfer"><![CDATA[Bank Transfers]]></string>
 </group>
</definitions>

Is there somewhere else I should be looking

Thankyou

Best Regards,

Peterp

Link to comment
Share on other sites

The module.definitions.xml gives the admin screens the language phrases.

So changing the <name> didn't work. (I'll make an issue of it in the Github.)

Did you clear the cache? Maybe that could make a difference?

I guess, for now, we can try changing the name of the folder.

First, disable the "Print Order Form" in admin, Manage Extensions. Change the folder name to /Bank_Transfers/. Re-visit Manage Extensions. Enable "Bank Transfers".

Link to comment
Share on other sites

Hi Brian,

             After the copy of the POF and naming it Bank_Transfers and changing the config.xml it seemed to fix that problem, an email is sent to the customer stating that the order has been received but there is no email being sent to admin stating that an order has been received and has a payment detail of Bank Transfer. There is an order created with a pending status in the admin orders but no email to admin

I don't think that is right or am I wrong

Best Regards,

Peterp

Hi Brian,

 I haven't changed the function transfer(), $transfer['action'] value but it still worked should I change it to Bank_Transfers

Link to comment
Share on other sites

Yes. Change that value to:

'action'    => 'index.php?_g=rm&amp;type=gateway&amp;cmd=call&amp;module=Bank_Transfers&amp;cart_order_id='.$this->_basket['cart_order_id'],
(note the trailing comma)

Also, lines 51 and 52 can be changed.

The POF does not move an order to Processing (unless a plugin or code snippet makes that happen). It stays at Pending.

Therefore, the admin will only get an email if, in admin, Store Settings, Features tab, Misc section, "Order status for admin email notifications" is set to Pending.

Link to comment
Share on other sites

Hi Brian,

Thanks for that I'm not sure what I have to change at lines 51 and 52 what I have is below

public function call() {
        //@todo everything
        $form_file    = dirname(__FILE__).'/'.'skin';

not sure what I need to change.

Also I thought that was the case as far as a pending order was created, however this clients orders are generally paid for via credit cards or paypal and therefore move to processed imediately which is fine but they would at least like a email that states that an order has been entered so they can watch out for the actual transfer to occur and then they can change the status of the Bank Transfer(POF) order manually. This email would be sent to the accounts department and therefore they would be looking for the bank transfer the next day.

Can we force the email that there is an order without changing the status of the order and not print the order until the status is changed manually to processed which is standard operation.

Hope you can help with this,

Appreciate your help

Best Regards,

Peterp

 

Link to comment
Share on other sites

I see POF 1.0.1 is out with a simple decimal fix, but your line 51 is my line 38. Which means you may have a bunch of comments lines at the top. I don't.

Anyway, my 51 - 52:

		$transData['notes'] = 'Print order form displayed to customer with payment instructions. Do not dispatch until postal payment has been received and cleared.';
		$transData['gateway'] = 'Print Order Form';

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...