kenkja Posted July 8, 2012 Share Posted July 8, 2012 (edited) I'm hoping to make this into add on, I would be grateful if some of you you are better than me at coding/add-ons would have a look, test it and suggest where I could improve the installation file Below is my draft of the installation file ********************************************* All Credit goes to Chritian at Hockrockhosting.com and to PiLLaO/reflex-ocasion ********************************************* As always backup your database and files ********************************************* This add on is intending to provide users of v2.31 and paypal standard with a more complete description of any sales which have taken place.. At present v2.3.1 only passes to PayPal standard, the details of who has been paid, the total goods quantity, shipping and total price. I can not gaurantee that this will show show any more than 3 lines on your primary e-mail addess, as this is eactly what it shows my Just Host e-mail account, however I have opted for a second e-mail to be directed to our Microsoft Live e-mail account which shows full details of the order. So just try it and see if works for you As always backup your database and files: ************************************************************************ Instructions to manually alfter yor files ************************************************************************ There are no files to upload, just modifiications of 2 files, I suggest you make a copy of both files by adding "bak" just before the .php of each of these so that at least you original files are retained. ************************************************************************* Files to alter catalog/includes/modules/payment/paypal_standard.php catalog/checkout_confirmation.php ************************************************************************* So here are the alterations to make 1- Open catalog/includes/modules/payment/paypal_standard.php Find: ----- 'item_name' => STORE_NAME, Replace with this: ------------------ 'item_name' => $_SESSION['FixOrder'], 2- Open catalog/checkout_confirmation.php (2A) Find: ----- require('includes/application_top.php'); Add after: ---------- $_SESSION['FixOrder'] = ""; (2B) Find: (it should be in standard v2.3.1. install around line 159) ----- <?php } else { ?> <tr> <td class="main" colspan="3"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <?php } Add after: ---------- $_SESSION['FixOrder'] = $_SESSION['FixOrder'] . $order->products[$i]['name'] . " x " . $order->products[$i]['qty'] . " "; (2C) Find: ----- if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>'; } } Replace with this: ------------------ if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>'; $_SESSION['FixOrder'] = $_SESSION['FixOrder'] . "(". $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] .")"; } } $_SESSION['FixOrder'] = $_SESSION['FixOrder'] ." | "; ************************************************************************ That's all ************************************************************************ Thanks ken Edited July 8, 2012 by kenkja Quote Os-commerce v2.3.3 Security Pro v11 Site Monitor IP Trap htaccess Protection Bad Behaviour Block Year Make Model Document Manager X Sell Star Product Modular Front Page Modular Header Tags Link to comment Share on other sites More sharing options...
Guest Posted July 8, 2012 Share Posted July 8, 2012 @@kenkja Already done, check HERE Chris Quote Link to comment Share on other sites More sharing options...
kenkja Posted July 10, 2012 Author Share Posted July 10, 2012 Hi Chris Thanks for the link, but I'm still a bit unsure about it as the installation file tells me in part 2 find 2, to locate the second occurence of <?php } else { ?> <tr> <td class="main" colspan="3"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <?php } for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { within catalog/checkout_confirmation.php but I can only find 1 instance of this code block. Ken Quote Os-commerce v2.3.3 Security Pro v11 Site Monitor IP Trap htaccess Protection Bad Behaviour Block Year Make Model Document Manager X Sell Star Product Modular Front Page Modular Header Tags Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2012 Share Posted July 10, 2012 @@kenkja Are you using a template ? Or have you modified the code already for another contribution ? If so, that might explain the difference. Chris Quote Link to comment Share on other sites More sharing options...
kenkja Posted July 10, 2012 Author Share Posted July 10, 2012 Hi Chris, I'm not using any templates, I re-downloaded v2.3.1 and tried to find the second instance of the code block concerned, but just can not see it. Either I am just being dumb, or the instruction is for v2.2 Probably me being dumb. ken Quote Os-commerce v2.3.3 Security Pro v11 Site Monitor IP Trap htaccess Protection Bad Behaviour Block Year Make Model Document Manager X Sell Star Product Modular Front Page Modular Header Tags Link to comment Share on other sites More sharing options...
pweden Posted July 11, 2012 Share Posted July 11, 2012 I am not using any extras. Just the files that are in 2.3.1 Did not work for me. I have three items at $.25 each. This is what the PayPal Summary looks like: Your order summary Descriptions Amount x | | | $0.75 Item price: $0.75 Quantity: 1 Item total $0.75 Tax $0.03 Shipping and handling: $0.50 Total $1.28 USD Total $1.28 USD Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.