Jump to content
Latest News: (loading..)

DAVID3733

♥Ambassador
  • Content count

    223
  • Joined

  • Last visited

About DAVID3733

  • Birthday 01/01/1964

Profile Information

Recent Profile Visitors

10,794 profile views
  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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..............
  7. 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
  8. 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
  9. 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

     

    David

     

    1. Show previous comments  1 more
    2. DAVID3733

      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

       

      regards 

       

      David

    3. Mikepo

      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

      Thanks

      Mike

    4. DAVID3733

      DAVID3733

      The one i use is 

      Worldpay hosted payment pages,  but there is also sage pay

      depends on what merchant services you are using

  10. 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
  11. DAVID3733

    Paypal Express County / State

    Hello I have been here before on this issue and to the best of my knowledge it has never been resolved so i thought i would see if anybody has any new answers I have 2.3.4bs and Paypal express 5.018 In the UK we ship by county or state, some counties are over seas such as northern Island, some counties are still mainland but incur further shipping costs because of location and the such Our counties list is exactly as Paypal has their's All works as it should apart from if the clients Paypal account is a little older they may not have been offered the drop-down list that is presented when they create a new account now This means that when the API contacts Paypal they may not have anything in the county list so my site states we do not ship to there I do have messages to explain the situation to the end user but clearly I am losing sales. I hope I have explained the situation properly, and would appropriate any further advise anybody can offer It is a problem and wonder how many sales it cost me and would love to resolve it Kindest regards David
  12. DAVID3733

    ULTIMATE Seo Urls 5 - by FWR Media

    We have both running that's KISSIT image and SEO URL 5 but afraid I am just a store owner and could not give you any more information of why it was not working Regards David
  13. Hello I was using XE for a while but now that has stopped working I signed up for a free account on Fixer, but the base currency is fixed to EUR, as use GBP i cannot use it usless i upgrade to the basic account which is only £10 per month but many a mickle makes a muckle so i am now using $ch = curl_init('https://api.exchangeratesapi.io/latest?&base=' . $from . '&symbols=' . $to); from https://exchangeratesapi.io/ seems to work at the moment, to make it easier i have included the whole section below that would go in Admin/includes/functions/ localization.php (dont forget you have to select define('CURRENCY_SERVER_PRIMARY', 'fixer'); in admin/application_top.php) Not a coder just a store owner so make your own enquires as to whether this is suitable for you function quote_fixer_currency($to, $from = DEFAULT_CURRENCY) { if ($to == $from) return 1; $ch = curl_init('https://api.exchangeratesapi.io/latest?&base=' . $from . '&symbols=' . $to); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($ch); curl_close($ch); $currencies = json_decode($data, true); if (isset($currencies['rates'][$to])) { return $currencies['rates'][$to]; } else { return false; } }
  14. DAVID3733

    Paypal not registering Customer Name

    Worked for me only difference was I had tep_db_perform('customers', $sql_data_array); instead of tep_db_perform(TABLE_CUSTOMERS, $sql_data_array); thank you
  15. Works for me, 2.3.4BS Previously used fixer Thank you
×