Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PJ2006

Pioneers
  • Posts

    600
  • Joined

  • Last visited

Everything posted by PJ2006

  1. I have a strange problem. I've been asked to remove the category image and the category name - which I have done. However, they want the top of the list of products table (i.e. the one you see when you select the category) the black top box to line up with the top of the category top black box - I can't work out how to do this or if it is even possible - I would have thought if it is possible STS is my best bet - I have it installed. Any Ideas, see the image below where the boxes dont match up, the products table is higher than the categories table - I've tried removing the categories drop down but it still doesn't line up.
  2. PJ2006

    Protx Direct v2.22

    Whooooooooo hoooooooooooooooooo it worked, thank you so much, now doing happy dance around the room - You are an absolute star Tom !!!!!
  3. PJ2006

    Protx Direct v2.22

    I haven't got the status lights working yet, but am less worried about that - they didn't work with the original admin/orders_protx.php Good new on the edit order front. I can now make payments via protx - the value is picked up. However, when I create a new order, adding new products does not seem to work, the value is not recalculated and the product is not added - if I refresh the page the new product is shown as added, but the value of the order remains at 0 so I guess this bit needs to get sorted and I will be there - so thank you for getting me nearer. You are right you did send me an edited admin/order_edits.php file. If I diff this file against the original file these are the differences (hoping something in here is causing the problem) After: (around line 65) //// //Update Order case 'update_order' The following is added: if ($_POST['protx']) { // Extra Configuration Options $disable_curl_ssl_check = false; // Set to true (no quotes) // if you are having problems connecting to the protx servers $timeout = 90; // Number of seconds to wait for Protx response $protocol = '2.22'; // Shouldn't need changing $currency = 'GBP'; // End of extra configuration options define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_DECLINED_MESSAGE', 'Your credit card could not be authorised. Please correct any information and try again or contact us for further assistance.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_ERROR', 'There seems to be a problem with your credit card.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_PROTX_ERROR', 'Unfortunately there has been a technical problem. Please try again and if the problem persists please contact us'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_PROTX_MALFORMED', 'Your credit card could not be authorised. Please correct any information and try again or contact us for further assistance.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_PROTX_INVALID', 'Your credit card could not be authorised. Please correct any information and try again or contact us for further assistance.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV_ERROR', 'The security code given does not match that of your card. Please correct this and try again.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_ADDRESS_ERROR', 'The billing address given does not match that of your card. Please correct this and try again.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_AVS_CVV_ERROR','There has been an error with the security checks. Please check your billing address matches your card statement address and the security code (CVV) is correct and try again.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_INVALID_ISSUE','The issue number given is incorrect. Please check is carefully (including any leading zero) and try again.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_INVALID_START','The start date is either incorrect or missing. Please check carfeully and try again.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_INVALID_CARDTYPE','The given card type is incorrect. Please check carefully and try again.'); define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_3D_DECLINED','Your card failed your bank\'s Verified by Visa / Mastercard Securecode checks. Please try again.'); /*include(DIR_WS_CLASSES.'currencies.php'); $currencies = new currencies; */ require(DIR_WS_CLASSES . 'order.php'); $order = new order((int)$_GET['oID']); $new_order_id = (int)$_GET['oID']; $order_description = 'Order Number: ' . (int)$_GET['oID']; // DATA PREPARATION SECTION unset($submit_data); // Cleans out any previous data stored in the variable // Populate an array that contains all of the data to be sent to Protx $delivery_add = ''; if ($order->delivery['street_address']) { $delivery_add = $order->delivery['street_address']; } if(ACCOUNT_SUBURB == 'true' && tep_not_null($order->delivery['suburb'])) { $delivery_add .= ",\r\n" . $order->delivery['suburb']; } if (tep_not_null($order->delivery['city'])) { $delivery_add .= ",\r\n" . $order->delivery['city']; } if (ACCOUNT_STATE == 'true' && tep_not_null($order->delivery['state'])) { $delivery_add .= ",\r\n" . $order->delivery['state']; } if (tep_not_null($order->delivery['country']['title'])) { $delivery_add .= ",\r\n" . $order->delivery['country']['title']; } $billing_add = ''; $billing_add = $order->billing['street_address']; if (ACCOUNT_SUBURB == 'true') { $billing_add .= ",\r\n" . $order->billing['suburb']; } $billing_add .= ",\r\n" . $order->billing['city']; if (ACCOUNT_STATE == 'true') { $billing_add .= ",\r\n" . $order->billing['state']; } $billing_add .= ",\r\n" . $order->delivery['country']['title']; $use_3D_Secure = 2; // Disable 3D-Secure as this is a MOTO (should be disabled automatically anyway) //calculate total $total = 0; for ($i=0; $i<sizeof($order->totals); $i++) { if ($order->totals[$i]['class'] == 'ot_total') { $total += $order->totals[$i]['value']; } } // create a random id for the transaction $uid = tep_create_random_value(32, 'digits'); $VendorTxCode = $new_order_id . '-' . $uid; $submit_data = array( VPSProtocol => $protocol, // Protocol Version (Should be 2.22 for this release) TxType => MODULE_PAYMENT_PROTX_DIRECT_AUTHORIZATION_TYPE, // Transaction Type Vendor => MODULE_PAYMENT_PROTX_DIRECT_VENDOR_NAME, // Vendor Login ID VendorTxCode => $VendorTxCode, // Unique Transaction ID Amount => number_format($total * $currencies->get_value($currency), 2,'.',''), Currency => $currency, Description => $order_description, CardHolder => substr($_POST['protx_direct_cc_owner'],0,50), CardNumber => $_POST['protx_direct_cc_number'], StartDate => $_POST['protx_direct_cc_start_month'].$_POST['protx_direct_cc_start_year'], ExpiryDate => $_POST['protx_direct_cc_expires_month'].$_POST['protx_direct_cc_expires_year'], IssueNumber => $_POST['protx_direct_cc_issue'], CV2 => $_POST['protx_direct_cc_cvv'], CardType => $_POST['protx_direct_cc_type'], BillingAddress => substr($billing_add,0,200), BillingPostCode => substr($order->billing['postcode'],0,10), DeliveryAddress => substr($delivery_add,0,200), DeliveryPostCode => substr($order->delivery['postcode'],0,200), CustomerName => substr($order->customer['name'],0,100), ContactNumber => substr($order->customer['telephone'],0,20), CustomerEMail => substr($order->customer['email_address'],0,255), // ClientIPAddress => tep_get_ip_address(), // Basket => $basketlist, AccountType => 'M', // This is a MOTO transaction - regardless of general setting Apply3DSecure =>$use_3D_Secure); // concatenate the submission data and put into variable $data while(list($key, $value) = each($submit_data)) { $data .= $key . '=' . urlencode($value) . '&'; } // Strip final & $data = substr($data, 0, -1); // SEND DATA BY CURL SECTION // Post order info data to Protx, make sure you have curl installed // Unset $response to make sure nothing left over from previous module calls unset($response); unset($responses); if (MODULE_PAYMENT_PROTX_DIRECT_TRANSACTION_MODE == 'Test') { $url = 'https://ukvpstest.protx.com/vspgateway/service/vspdirect-register.vsp'; } elseif (MODULE_PAYMENT_PROTX_DIRECT_TRANSACTION_MODE == 'Server IP Test') { $url = 'https://ukvpstest.protx.com/showpost/showpost.asp'; } elseif (MODULE_PAYMENT_PROTX_DIRECT_TRANSACTION_MODE == 'Simulator') { $url = 'https://ukvpstest.protx.com/VSPSimulator/VSPDirectGateway.asp'; } else { $url = 'https://ukvps.protx.com/vspgateway/service/vspdirect-register.vsp'; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); if ($disable_curl_ssl_check === true) { curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); } $response = curl_exec($ch); $curl_error = curl_error($ch); curl_close ($ch); // Begin Debug Section if (MODULE_PAYMENT_PROTX_DIRECT_TRANSACTION_MODE == 'Server IP Test'){ echo print_r($response,true); echo print_r($data,true); exit(); } // End Debug Section // parse Protx response string $responses = Array(); $response_array = explode("\r\n", $response); for ($i=0; $i < sizeof($response_array); $i++) { $key = substr($response_array[$i],0, strpos($response_array[$i], '=')); $responses[$key] = substr(strstr($response_array[$i], '='), 1); } // Begin Debug Section if (MODULE_PAYMENT_PROTX_DIRECT_DEBUG == 'True'){ echo '<pre>Request URL=' . $url . "\r\n" . 'Data string sent=' . $data . "\r\n" . 'Protx response=' . $response . "\r\n" . 'Response array='. print_r($responses,true) ."\r\n". 'curl_error= ' . $curl_error . '</pre>'; exit(); } // End Debug Section $data = Array('id' => '', 'customer_id' => $order->info['customers_id'], 'order_id' => $new_order_id, 'vendortxcode' => $VendorTxCode, 'txtype' => MODULE_PAYMENT_PROTX_DIRECT_AUTHORIZATION_TYPE, 'value' => number_format($total * $currencies->get_value($currency), 2, '.', ''), 'vpstxid' => $responses['VPSTxId'], 'status' => $responses['Status'], 'statusdetail' => $responses['StatusDetail'], 'txauthno' => $responses['TxAuthNo'], 'securitykey' => $responses['SecurityKey'], 'avscv2' => $responses['AVSCV2'], 'address_result' => $responses['AddressResult'], 'postcode_result' => $responses['PostCodeResult'], 'CV2_result' => $responses['CV2Result'], '3DSecureStatus' => $responses['3DSecureStatus'], 'CAVV' => $responses['CAVV'], 'txtime' => date('Y-m-d H:i:s')); tep_db_perform('protx_direct', $data); $protx_id = tep_db_insert_id(); // Check response and proceed appropriately $response_code = substr($responses['StatusDetail'],0,4); $authorised = false; // Default to transaction failed $error_detail = ''; switch ($responses['Status']) { case "OK": case "REGISTERED": case "AUTHENTICATED": // OK to proceed $authorised = true; break; case "REJECTED": case "NOTAUTHED": if ($response_code == '2001') { if (stristr($responses['AVSCV2'], 'NO DATA MATCHES')) { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_AVS_CVV_ERROR; } elseif (stristr($responses['AVSCV2'], 'SECURITY CODE MATCH ONLY')) { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_ADDRESS_ERROR; } elseif (stristr($responses['AVSCV2'], 'ADDRESS MATCH ONLY')) { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV_ERROR; } else { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_DECLINED_MESSAGE .' (' . $responses['StatusDetail'] . ')'; } } elseif ($response_code == '4026') { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_3D_DECLINED; } else { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_DECLINED_MESSAGE .' (' . $responses['StatusDetail'] . ')'; } break; case "MALFORMED": $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_PROTX_MALFORMED . ' (' . $responses['StatusDetail'] . ')'; break; case "INVALID": if ($response_code == '5015') { if (stristr($responses['StatusDetail'],'Issue')) { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_INVALID_ISSUE; } elseif (stristr($responses['StatusDetail'],'Start')) { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_INVALID_START; } } elseif ($response_code == '4022') { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_INVALID_CARDTYPE; } else { $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_PROTX_INVALID . ' (' . $responses['StatusDetail'] . ')'; } break; case "ERROR": // There's a fault with module or Protx $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_PROTX_ERROR . ' (' . $responses['StatusDetail'] . ')'; break; default: // Just in case we haven't caught any other response, assume failed $error_detail = MODULE_PAYMENT_PROTX_DIRECT_TEXT_PROTX_ERROR . ' (' . $responses['StatusDetail'] . ')'; break; } if ($authorised === true) { $messageStack->add_session('Payment successful', 'success'); tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=edit')); } else { $messageStack->add_session('Payment Failed: '.$error_detail, 'error'); tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=edit')); } } Line: 'payment_method' => tep_db_input(tep_db_prepare_input($_POST['update_info_payment_method'])), Changed to: 'payment_method' => tep_db_input(tep_db_prepare_input(htmlspecialchars($_POST['update_info_payment_method']))), Line: 1164 </tr> Replaced with: </tr> --> <tr> <td> <?php $protx_direct = new protx_direct; $selection[0] = $protx_direct->selection(); ?> <table border="0" width="100%" cellspacing="0" cellpadding="2" class="bor"> <tr> <td class="main" width="100%" colspan="2">Enter Payment Information</td> </tr> <?php $radio_buttons = 0; for ($i=0, $n=sizeof($selection); $i<$n; $i++) { ?> <tr> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) { echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } else { echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } ?> <td class="main"><b><?php echo $selection[$i]['module']; ?></b></td> <td class="main" align="right"> <?php if (sizeof($selection) > 1) { echo tep_draw_radio_field('payment', $selection[$i]['id']); } else { echo tep_draw_hidden_field('payment', $selection[$i]['id']); } ?> </td> </tr> <?php if (isset($selection[$i]['error'])) { ?> <tr> <td class="main" colspan="2"><?php echo $selection[$i]['error']; ?></td> </tr> <?php } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) { ?> <tr> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="2"> <?php for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) { ?> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } ?> </table> </td> </tr> <?php } ?> </table></td> </tr> <?php $radio_buttons++; } ?> </td> </tr> <tr> <td class="main"><?php tep_draw_hidden_field(tep_session_name(), tep_session_id()); tep_draw_hidden_field('oID', $oID); ?> <input type="submit" name="protx" value="Create new payment"></form></td> </tr> I'm guessing somewhere in here the update to the value/contents of the shopping bag is not happening. If you have any idea you would make me quite possibly the happiest person in the UK!
  4. I tried this but still no joy. I have two problems: 1) In Admin I have no address line 2, and the county box is not drop down 2) From the customer side, Address Line 2 and County entries are not storing in the DB this means I can't configure postage either. Is there anyone that can help, I've tried everything I can think of.
  5. PJ2006

    Protx Direct v2.22

    1) I wasn't using customer stats - I've now switched that on - thanks 2) I used Manual Order Editor: http://www.oscommerce.com/community/contri...al+order+editor Is there a different one I should be using? I need to be able to create orders from admin to cater for telephone orders. I will happily uninstall this and try another - I really need to get this working in order to go live. I have a third problem in that the protx status lights don't appear to be working, I get the table headers displayed but thats all. Thanks
  6. If it helps anyone, the problem is that my files within my cache directory are not created with permissions set to 777 - I used my control panel to change these rights - it takes and age and is a pain - certainly wont be acceptable to my user! If anyone knows how to create the files with 777 permissions set I'd love to know - but this may help others with this problem.
  7. If it helps anyone, the problem is that my files within my cache directory are not created with permissions set to 777 - I used my control panel to change these rights - it takes and age and is a pain - certainly wont be acceptable to my user! If anyone knows how to create the files with 777 permissions set I'd love to know - but this may help others with this problem.
  8. PJ2006

    Protx Direct v2.22

    I have two problems: 1) I am running a UK store but have to have my protx settings as - Payment Zone = None, if I change to UK Protx disappears 2) When I create an invoice via the admin - I can't make a protx payment I always get this error: Payment Failed: Your credit card could not be authorised. Please correct any information and try again or contact us for further assistance. (4009 : The Amount is outside the allowed range. The value was 0.00.) Any Suggestions? Thanks
  9. I have this installed with Protx direct, but when I change an order, or create a new order, I cannot enter credit card details - any suggestions? Thanks
  10. Thanks Bill I did use your one, but guess I must have done something wrong :'( Do you have any ideas what I might have done wrong? Thanks Lotti
  11. Did you get this sorted, or does anyone know the solution I get a similar error on confirm at checkout: Warning: main(includes/modules/EMAIL_INVOICE_DIRFILENAME_EMAIL_INVOICE) [function.main]: failed to open stream: No such file or directory in /home/src/public_html/shop/checkout_process.php on line 226 Warning: main(includes/modules/EMAIL_INVOICE_DIRFILENAME_EMAIL_INVOICE) [function.main]: failed to open stream: No such file or directory in /home/src/public_html/shop/checkout_process.php on line 226 Warning: main(includes/modules/EMAIL_INVOICE_DIRFILENAME_EMAIL_INVOICE) [function.main]: failed to open stream: No such file or directory in /home/src/public_html/shop/checkout_process.php on line 226 Fatal error: main() [function.require]: Failed opening required 'includes/modules/EMAIL_INVOICE_DIRFILENAME_EMAIL_INVOICE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/src/public_html/shop/checkout_process.php on line 226 I have checked the hints at the end of the install doc and html_invoice.php is definitely in templates. Can anyone help? Thanks
  12. I have this problem, I can't remove items added to cross sell via the control panel. This response seems to say I need to remove the contribution I installed and try another - could anyone tell me which one? I've been searching all day for a solution Thanks
  13. I have installed x-sell and get this error when I create cross sell items, below the items: Warning: mkdir(/cache/30) [function.mkdir]: No such file or directory in /home/src/public_html/shop/includes/modules/xsell_products.php on line 86 Warning: fopen(/cache/301-0.php) [function.fopen]: failed to open stream: No such file or directory in /home/src/public_html/shop/includes/modules/xsell_products.php on line 87 Warning: fwrite(): supplied argument is not a valid stream resource in /home/src/public_html/shop/includes/modules/xsell_products.php on line 88 Warning: fclose(): supplied argument is not a valid stream resource in /home/src/public_html/shop/includes/modules/xsell_products.php on line 89 Everything works correctly but clearly this is unsightly and cannot be left. Can anyone help? I think it's a cache problem but I'm not sure.
  14. I'm trying to do the following, I want a home page that I can use FCKEditor on - I've installed this contribution, but would like to use it so that no html users can change the content of the home page. So I'm thinking, I could move the home page to within the site and use the $Content tag and it should work - right? But I'm not sure how to create a new page and assign it an STS template - I don't quite follow the instructions "Create content templates for any pages" Can this be done or am I totally barking up the wrong tree? Thanks
  15. I've installed this. I had a real problem when I installed the sql file - I've now repaired my db. I've tried again but do not get Address line 2 or a drop down box for county - in fact do not get county at all. Could you tell me how I get Address line2 and county please? I also want to have UK VAT but I'm not sure how to do this. I'm guessing with the sql file I should have just installed parts but there is no installation guide so I'm really confused, I could really do with some help. Thanks
  16. I have installed this for STS users, but have a problem. When I have a Featured product my site changes to look like this: When I do not have a Featured product my site looks like this: http://www.ryderguitars.co.uk/nfp.gif I've tried re-installing but just can't get it to position correctly, even the welcome guest jumps out of the main page. Does anyone know what I've done wrong, I would really like to use this contribution :(
  17. I'm running UltraPics with lightbox. I have two questions: I would like to be able to link the additional images - i.e. for different colours to that product for ordering I would like when the picture is enlarged to show the Product Name, Description, Price etc but currently just get "Close Window" and cannot figure out how to implement this Thanks Lotti
  18. OK, I got this working - you also have to edit the additional_images.php.
  19. I've installed Ultra Pics, I've used the lightbox for STS users to get this too work - http://www.oscommerce.com/community/contri...ch,lightbox+sts the problem I have, is I've managed to get it working for the main image but the extra images no longer pop up. Any suggestions?
  20. I've just installed the latest version but get nothing in my admin - I've double checked and have definitely made the changes to admin /includes/functions/general.php I also noticed in earlier installation notes, there are some instructions to upload some sql files - this is not in the latest instructions, is this no longer necessary? Can anyone help :'(
  21. I want to install a contribution which will make it quicker and easier to add Product attributes, can anyone recommend on they have found works well for this or is everyone just using the default oscommerce on? Thanks Lotti
  22. Try looking in this thread, lots of people asking that question, I've been ploughing through trying to find solutions to my problems so have not found out yet if there is a solution, but I'm pretty sure these is. I saw mention of a EP contribution for UltraPics. Good luck, I will probably hit this in a few weeks, so if you do identify the solution please post back http://www.oscommerce.com/forums/index.php?sho...mp;hl=UltraPics
  23. I finally got this working - it was a server problem, so anyone else that hits th problems I did check with your hosting company!!! It was worth persevering as It's a great contribution! One question. I want to add some more pages, such as a home page which can use this editor to manage content. Can I do that? Thanks Lotti
  24. Jack, It turns out it was a server problem that was stopping it working, so sorry for thinking it could be related to HTC or rather my inability to get two contributions to work together! I didn't install TinyMCE Anywhere I panicked at the mention of ACA and not being able to help much if this wasn't installed! I would still like to try TinyMCE but do not feel confident enough at the moment to try. Thanks Lotti
×
×
  • Create New...