Jump to content
Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

About DAVID3733

  • Birthday 01/01/1964

Profile Information

Recent Profile Visitors

10,952 profile views
  1. Hi there I have copied an existing working version of my website in 2.3.4bs including database to new server so i can test it and get it working with PHP7 and http2 before i migrate properly also with the new server will later migrate to latest edge but need to get old one working properly first There are of course a few issues that i willl work with and catalog side seems in general ok but struggling with admin login It used to have htaccess password auth login but removed it from both catalog and admin .htaccess I also changed the password in php admin But i cannot login to admin I get presented the admin-login page, so assume i have the path correct in config , if i type the wrong password it tells me If i type the right password i get directed to a catalog custom error page, if i look at the error code it is 500 I have checked and double checked and triple checked the config pages, paths and so on and it all looks ok I was wondering if there were any obvious compatibility issues that i should address with PHP7 that anyone could think of My old version is 5.4 the new is 7.2.14 I do not have access to php server error log yet as its still being configured, maybe that will throw a bit of light Any pointers would be appreciated
  2. DAVID3733

    Http/2 vs http/1.1

    Hi Ok so OSC works and by the looks of it from your chart making multiple connections as it should which will speed up delivery Thanks for sending the graphic David
  3. DAVID3733

    Http/2 vs http/1.1

    Thank you for your reply Not asking how to install Http2 but if anybody is running OSC on it ( i have 2.3.4bs) and what issues if any was there Very interested in any speed advantages found regards David
  4. DAVID3733

    Http/2 vs http/1.1

    The demo site https://demo.oscommerce.com/index.php appears to be on a http2 capable server but is serving as http1.1 I would be interested to know if anyone has osc running on http2 and any difference it has made Regards
  5. DAVID3733

    Lazy Load Images

    Hi There Installed on 2.3.4bs gold For the most seems to work well Problem with store logo, seems to try to lazy load that which is not needed and also the language flags in the NAV bar which are no longer view-able, this seems to be what calls them echo '<li><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')), $request_type, true, true, $key) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name'], NULL, NULL, NULL, false) . '</a></li>'; Tried to make the flags just text to get round it as they take up valuable down load time anyway but haven't worked that out yet without breaking it regards
  6. Hello I have a site 2.3.4bs running https with SSL cert by network solutions OV server CA2 Always trying to speed things up Spent so much time altering the order of script downloads, trying to reduce the .css size and so on Wondered if anybody has eCommerce running now on http/2, if so could they share the experience, any issues and so forth and of course was they a speed improvement and whats was it Thank you David
  7. DAVID3733

    Paypal Express County / State

    I have now finished and have a working situation, and as I hate it when threads do not finish I will summarise everything here to help someone who might be in the same situation as me I have 2.3.4 BS with PHP 5.4.45 Based in UK, different VAT or TAX to some areas, the Channel Islands Post small Items out via Royal mail Larger items out via courier advertise free shipping on orders over £50 but not in some areas which are charged extra by my shipper such as Highlands, Islands Northern Island or channel islands all areas which come under Royal mail postage as UK The Initial issue was with PayPal Express, many longer Paypal users have not formatted their address properly, as they must do now if they opened a new account. My original shipping setup changed the price for whatever (county or State) the parcel was going to which is not as good as postcodes but hey!, some of areas do not pay Tax (channel Islands) and some cost me more to send to if the parcel is over 2kg (northern Island) and some i ship to free over a certain price. So I had to use counties/states to narrow down the shipping charges, unfortunately in PayPal (express clients) the county or state might be shortened from say example BUCKS instead of Buckinghamshire or they might not have any county or state listed at all, this as causing lost sales as they will go elsewhere if it's not easy. I tried a number of things, different shipping modules but as one thing got changed it highlighted something else that would be a issue so below is now how a have it set up now and all appears to be working. I ship worldwide but most of my business goes to United kingdom and Europe, if someone outside the UK purchases then PayPal is not a issue as it uses the country price on my website. United Kingdom Consists of Most of UK mainland, free shipping of £50, My fixed rates for orders under £50 which i send either by royal mail or courier depending on weight Highlands - an area within the UK which couriers charge more for and i do not offer free shipping so different rates for this area Northern Island - this is offshore to UK, I do not offer free shipping, costs by royal mail is same up to 2k but couriers charge more so again different rates other islands, IOM, IOW Shetlands and so on, similar to above, royal mail charge the same prices up to 2k but all different rates for couriers Channel Islands - again similar to above except they do not pay VAT or Tax for our goods The Only way I could satisfy all of the shipping area requirements, VAT area requirements and PayPal's lack of formatting issues was to use postcodes / zipcodes which are used throughout all of these regions for the shipping quotation. I tested a few options on my test site, many of gave other issues such as the space in the postcode before the last three characters which some PayPal accounts had and some did not, some had no ability to do free shipping or want to play with my other modules. The one i ended up with came from @brockleyjohn if you PM him i am sure he will let you know more information, I think he called it postcode_shipping It is a modified version of a earlier piece of code. This shipping module works with the UK postcode layout using the first 3 or four characters of the postcode so does not cause a issue with PayPal, it has language files too, quite easy to install for a novice like me, it came with UK postcode list which you can adapt to your own courier requirements. Because this module could work with price or weight it meant that i could duplicate it, change all of the constants and class in the file and create myself a free shipping module and use the same postcode list in the database to offer free shipping in only the areas i wanted. So now i have controllable shipping costs for everywhere in the UK including islands Then the issue was channel islands, my VAT was set up to charge VAT in all of Europe minus the channel islands, I had achieved this by adding all of the countries into a tax zone in location/taxs Tax zones except UK which i added in all counties apart from jersey and Guernsey, this could not work the way it was now set up to use postcodes. So I ended up getting a PayPal express zone fix from @raiwa again PM him for more details, with this you put uk in tax zone as all zones, then you can configure in admin to exclude certain ID of zones you do not want to charge VAT on, and you can put mis spelling of those few counties in too. Just to let you know if you hadn't already guessed I am a shop owner not a coder so it was not that difficult, did spend a lot of time testing on a test site as the last thing i wanted was my site down, it did take a few days and evening's but that was because i was in unknown territory, hopefully it will be worth it Have Fun
  8. DAVID3733

    Paypal Express post code Format

    Ah see what you mean I am looking at it from the wrong angle, at the moment its in the js for the form when its inserted on the website as its typed I will play with the actual shipping module itself to try to make it read and convert on the fly Thanks David
  9. DAVID3733

    Paypal Express post code Format

    Hi there I have spent hours trawling but cannot find this answer so apologise if someone has already asked it. Have 2.3.4bs with php 5.4.45 Using Paypay express paypal spp 5.018 Have had issues with county and cost of shipping so moving over to use postcodes within the UK My site requires postcode to be in the format of AA99 9AA or A99 9AA, ie 6 or 6 digits but with a space before the last 3 If someone creates a account on the site it formats it in this way using a modified expression in catalog/includes/form_check.php check_input("street_address", <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_STREET_ADDRESS_ERROR; ?>"); if (form.elements['country'].value == 222) { testPostCode (); } function checkPostCode (toCheck) { // Permitted letters depend upon their position in the postcode. var alpha1 = "[abcdefghijklmnoprstuwyz]"; // Character 1 var alpha2 = "[abcdefghklmnopqrstuvwxy]"; // Character 2 var alpha3 = "[abcdefghjkstuw]"; // Character 3 var alpha4 = "[abehmnprvwxy]"; // Character 4 var alpha5 = "[abdefghjlnpqrstuwxyz]"; // Character 5 // Array holds the regular expressions for the valid postcodes var pcexp = new Array (); // Expression for postcodes: AN NAA, ANN NAA, AAN NAA, and AANN NAA pcexp.push (new RegExp ("^(" + alpha1 + "{1}" + alpha2 + "?[0-9]{1,2})(\\s*)([0-9]{1}" + alpha5 + "{2})$","i")); // Expression for postcodes: ANA NAA pcexp.push (new RegExp ("^(" + alpha1 + "{1}[0-9]{1}" + alpha3 + "{1})(\\s*)([0-9]{1}" + alpha5 + "{2})$","i")); // Expression for postcodes: AANA NAA pcexp.push (new RegExp ("^(" + alpha1 + "{1}" + alpha2 + "?[0-9]{1}" + alpha4 +"{1})(\\s*)([0-9]{1}" + alpha5 + "{2})$","i")); // Exception for the special postcode GIR 0AA pcexp.push (/^(GIR)(\s*)(0AA)$/i); // Standard BFPO numbers pcexp.push (/^(bfpo)(\s*)([0-9]{1,4})$/i); // c/o BFPO numbers pcexp.push (/^(bfpo)(\s*)(c\/o\s*[0-9]{1,3})$/i); // Load up the string to check var postCode = toCheck; // Assume we're not going to find a valid postcode var valid = false; // Check the string against the types of post codes for ( var i=0; i<pcexp.length; i++) { if (pcexp[i].test(postCode)) { // The post code is valid - split the post code into component parts pcexp[i].exec(postCode); // Copy it back into the original string, converting it to uppercase and // inserting a space between the inward and outward codes postCode = RegExp.$1.toUpperCase() + " " + RegExp.$3.toUpperCase(); // If it is a BFPO c/o type postcode, tidy up the "c/o" part postCode = postCode.replace (/C\/O\s*/,"c/o "); // Load new postcode back into the form element valid = true; // Remember that we have found that the code is valid and break from loop break; } } // Return with either the reformatted valid postcode or the original invalid // postcode if (valid) {return postCode;} else return false; } function testPostCode () { var toCheck = form.elements['postcode'].value; if (checkPostCode (toCheck)) { form.elements['postcode'].value = checkPostCode (toCheck); } else { error_message = error_message + "* " + "Your postcode is invalid" + "\n"; error = true; } } But this is not used by the paypal app so if a UK customer dos not have a space in there paypal account the shipping quote fails Is there a way of ensuring the API converts it to the correct format on the fly? Thank you David
  10. DAVID3733

    Paypal Express County / State

    Two problems have emerged The first, I use a contrib called freeamount, its free shipping for orders within the standard area ie not places like Northern Island which costs more to ship if its over 2 kilos, so i need to see if that can be changed to look at the postcode zones rather that the tax zones which is what it does now The second Paypal Express, if the postcode is not formatted correctly ie AA999AA instead of AA99 9AA (no space before the last 3 as all UK postcodes are) there is currently no structure to change it on the fly to get the shipping, it therefore breaks the shipping cost and it it is not charged, I am also not sure if there is a postcode but not a county what will happen, hopefully it will just rely on the postcode These may both be quite easy items to fix although probably out of my comfort zone and its getting very late so going to bed and re-look in the morning
  11. DAVID3733

    Paypal Express County / State

    Next Update Little bit of extra info that might help someone I had previously set up error message in paypal for people who didnt have a county set up in Paypal express, but i did not realise that does not show unless they come back to your site so if you have it enabled then set to disabled in the store in admin Now back to the main event I set up a test site and downloaded http://addons.oscommerce.com/info/4712 I also got a few tips from @Mikepo for the splitting up of the postcode into proper AA99 9AA format which is required, with thee tweaks it works on my installation But of course it does not end there, all of my old clients have postcodes that are not formatted correctly so had to make amendments to the original database to change them, I also made all of the postcodes UPPER case while i was at it using the following in PHP my admin update address_book set postcode = concat(left(entry_postcode , length(entry_postcode)-3) , ' ' , right(entry_postcode ,3) ) where (position(' ' in entry_postcode) = 0) AND entry_country_id = 222 and then also UPDATE address_book SET entry_postcode = UPPER(entry_postcode) WHERE entry_country_id = 222 So now when you create a new account it formats the postcode correctly even if they do not put a space in The website sorts out the shipping cost for areas that might be in areas outside of the norm such as northern Island. So you would think every thing is fine and Dandy But..............
  12. DAVID3733

    Paypal Express County / State

    Just as a update I am sure there is more than one person with this issue in the UK so going to try to keep this updated I have looked a few Postcode contributions including the @raiwa has included above I am going to test a few and install them on test site to see what i think is more suitable Have a few worries going around in my head but think they are probably unfounded
  13. DAVID3733

    Paypal Express County / State

    Looking through the PayPal logs it appears the only continuity is Postcodes, they all appear to have them I will start to look at these contributions, I have 2.3.4bs with PHP 5.4 plus if anyone can recommend a particular contrib then please do I assume a list of postcodes will not be that hard to get, and assume they do not change, at least not the first 3 or 4 front half David
  14. Hi there

    You state you have used and made changes to the postcode shipping contribution

    I tried to reply on the thread but its been archived

    I am in UK and use counties to ship by, not the standard format but it works for me

    The problem i have currently is using Paypal Express, many of older Paypal users do not have a county specified or wrongly spelt on there account so i was thinking maybe by postcode

    I see that you say you have spilt the postcode to first section and pricing on that, ie se18 ****

    Couple of questions

    you say you have made some changes to work in later additions, i have 2.3.4bs and php 5.4+

    Can you see any other issues  in your experience

    and do you think it will be suitable for what i want to achieve

    if so I would love to receive the amendments you made so i can test

    Kindest regards




    1. Show previous comments  1 more
    2. DAVID3733


      Hi thanks for getting back to me

      email address is sales@batterytrader.com

      I use Worldpay for credit cards and Paypal express (which a lot of people prefer and increased sales when it was implemented)

      We also do a lot of telephone orders, by credit card, which we also use Worldpay, and for that matter some of the companies will only pay BACS,  we even had a postal order a couple of months ago

      You are right you do need to offer more than one facility as people have different options, some see paypal as dodgy, some will only use paypal





    3. Mikepo


      Thanks for the info David.

      I'll check out worldpay.  Is there a module specific to Oscommerce?

      I'll package up the files tonight.

      btw, the function I'll supply is called after the create account submit, it only checks the postcode format and sets the characters to uppercase before DB insertion.

      so if the customer types Ab11 1xX it is changed to AB11 1XX

      and Ab111xx is chnaged to AB11 1XX



    4. DAVID3733


      The one i use is 

      Worldpay hosted payment pages,  but there is also sage pay

      depends on what merchant services you are using

  15. DAVID3733

    Paypal Express County / State

    Hello again It was suggested that maybe I could use something to second guess a mis-spelt county/state say for example BUCKS instead of Buckinghamshire as would now be listed in Paypal drop-down list This unfortunately will not work as far as i can see as I having been going through the Paypal logs and in some cases the county/state is not there full stop example (edited out real address with **) street_address=112%2C+**+Rd&locality=London&region=&postal_code=SE**+2**&country=GB as you can see "region" which should have the county/state name in it is blank, this means my API will not see it as place it can ship to David