Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cannuck1964

Members
  • Posts

    1,043
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by cannuck1964

  1. My version of osC is 2.3.4++ I do a lot of upgrades and do not follow all of the osC releases. Tried the new one and same thing, no luck. I think I will try upgrading my jQuery and bootstrap versions, maybe that will help, not sure when I did so last. thanks Peter
  2. Thanks Demitry, but no, that does not work either. Normally I do not have a lot of issues with javascript, but this one is just not quite right. I suspect a conflict somewhere.
  3. And adding in the line: var sn=$("#inputState").val(); does not help. cheers Peter
  4. I have the developer module running. did not think this would be a hard contribution to install, but this is the error : Uncaught ReferenceError: sn is not defined <anonymous> https://dev.mrboxonline.com/quote_history.php:127 Coming from this code: window.addEventListener('DOMContentLoaded', function() { if($("#inputCountry").val()==""){ $("#inputCountry").val('223'); } if($("#inputCountry").val()!=""){ $("label[for='inputState']+div").html(''),id_country=$("#inputCountry").val(),$.post("states.php",{country_id:id_country,state_name:sn},function(a){ $("label[for='inputState']+div").html(a) } ) } }); sn (state name) is not defined for some reason. cheers Peter
  5. Thanks Jack, no did not work. I might just move past it, as my guess it is a conflict somewhere. I have a lot of JS on the site, looking to actually move all cart functions to AJAX calls. I use a lot of modals to login, create accounts etc. cheers Peter
  6. This is the form input I am using: <div class="md-form pb-3"> <div class="form-group has-feedback"> <label for="inputState" class="control-label col-sm-6">State/Province:</label> <select name="state" placeholder="Enter State" required aria-required="true" aria-describedby="atState" id="inputState" class="form-control validate white-text" > <option value="1">Alabama</option><option value="2">Alaska</option><option value="4">Arizona</option><option value="5">Arkansas</option><option value="12">California</option><option value="13">Colorado</option><option value="14">Connecticut</option><option value="15">Delaware</option><option value="16">District of Columbia</option><option value="18" selected="selected">Florida</option><option value="19">Georgia</option><option value="21">Hawaii</option><option value="22">Idaho</option><option value="23">Illinois</option><option value="24">Indiana</option><option value="25">Iowa</option><option value="26">Kansas</option><option value="27">Kentucky</option><option value="28">Louisiana</option><option value="29">Maine</option><option value="31">Maryland</option><option value="32">Massachusetts</option><option value="33">Michigan</option><option value="34">Minnesota</option><option value="35">Mississippi</option><option value="36">Missouri</option><option value="37">Montana</option><option value="38">Nebraska</option><option value="39">Nevada</option><option value="40">New Hampshire</option><option value="41">New Jersey</option><option value="42">New Mexico</option><option value="43">New York</option><option value="44">North Carolina</option><option value="45">North Dakota</option><option value="47">Ohio</option><option value="48">Oklahoma</option><option value="49">Oregon</option><option value="51">Pennsylvania</option><option value="53">Rhode Island</option><option value="54">South Carolina</option><option value="55">South Dakota</option><option value="56">Tennessee</option><option value="57">Texas</option><option value="58">Utah</option><option value="59">Vermont</option><option value="61">Virginia</option><option value="62">Washington</option><option value="63">West Virginia</option><option value="64">Wisconsin</option><option value="65">Wyoming</option></select> </div> </div> <div class="md-form pb-3"> <div class="form-group has-feedback"> <label for="inputCountry" class="control-label col-sm-6">Country:</label> <select name="country" required aria-required="true" aria-describedby="atCountry" id="inputCountry"><option value="" selected="selected">Please Select</option><option value="38">Canada</option><option value="223">United States</option></select> </div> </div>
  7. I want to run this on every page load. I am using : $(document).ready(function(){ if($("#inputCountry").val()==""){ $("#inputCountry").val('223'); } if($("#inputCountry").val()!=""){ $("label[for='inputState']+div").html('<i class="fa fa-spinner fa-spin fa-2x fa-fw" style="margin-top:2px; margin-bottom:9px; margin-left:0px;"></i>'),id_country=$("#inputCountry").val(),$.post("states.php",{country_id:id_country,state_name:sn},function(a){ $("label[for='inputState']+div").html(a) } ) } }); The state does not change from USA to Canada. I have put the script below the drop downs in the code. Not sure why it is not though, is there a specific BS version I need to be using or some tool in the BS release?
  8. I am currently working on that right now. The usage of "each" is all over the place and was my starting point. Is a slow and tedious job, since this function is used extensively all over the files.
  9. You would have to look at the shipto (or billto) address and put a filter on the payment modules being displayed out (or modify the module).
  10. Hi, I have developed a CIM frame work for authorize. CIM uses XML for communication, and allows for a host of newer features. I am just looking to implement an update to the error handling on expired cards.
  11. For hosted forms. For XML it is the preferred method of implementation The link I sent is for XML implementation classes Hosted forms have not been in use for a very long time now. cheers Peter
  12. The CIM method has a lot of added functionality. You can use it to save credit card data with authorize.net in a PCI safe manor, and subscription etc easily implemented. I have built the CIM based system to save card info etc. I will see if I have some time to put a package together, just that the extraction etc will take some work to do and not sure I have the time until after vacation and work load. There are some class implementations if anyone wants to start it up on development: https://github.com/stymiee/Authorize.Net-XML cheers Peter
  13. This generally means the SOAP library is not installed on the server. This library is needed for the module to communicate with fedex. You may want to contact your hosting provider and ask them about it. cheers Peter
  14. Actually Jack the TLS1.2 requirement will be in 4 months (Sept 18, 2017).
  15. A a mistake I seen here: should have stated : For defining the shipping to type (commercial or residential) I have added a new field to the address_book table called address_type. The address book needs this as the customer may have multiple ship to addresses which means each address should be checked. Cheers Peter
  16. For defining the shipping to type (commercial or residential) I have added a new field to the customer table called address_type. On log in, this new field is made as a session, having the values : residential commercial empty (not set since customer has not added to the cart any items and checked out) the session variable $address_type is added to the shipping module function quote as a global. New code to add into the function quote is: if($address_type == ''){ $path_to_address_validation_wsdl = DIR_FS_CATALOG . DIR_WS_INCLUDES . "wsdl/AddressValidationService_v2.wsdl"; $av_client = new SoapClient($path_to_address_validation_wsdl, array('trace' => 1)); // Refer to http://us3.php.net/manual/en/ref.soap.php for more information ini_set("soap.wsdl_cache_enabled", "0"); $residential_address = true; $address_validation = false; $av_request['WebAuthenticationDetail'] = array('UserCredential' => array('Key' => $this->fedex_key, 'Password' => $this->fedex_pwd)); $av_request['ClientDetail'] = array('AccountNumber' => $this->fedex_act_num, 'MeterNumber' => $this->fedex_meter_num); $av_request['TransactionDetail'] = array('CustomerTransactionId' => ' *** Address Validation Request v2 using PHP ***'); $av_request['Version'] = array('ServiceId' => 'aval', 'Major' => '2', 'Intermediate' => '0', 'Minor' => '0'); $av_request['RequestTimestamp'] = date('c'); $av_request['Options'] = array('CheckResidentialStatus' => 1, 'VerifyAddress' => 1, 'MaximumNumberOfMatches' => 10, 'StreetAccuracy' => 'MEDIUM', 'DirectionalAccuracy' => 'MEDIUM', 'CompanyNameAccuracy' => 'MEDIUM', 'ConvertToUpperCase' => 1, 'RecognizeAlternateCityNames' => 1, 'ReturnParsedElements' => 1); $av_request['AddressesToValidate'] = array( 0 => array( 'AddressId' => 'Customer Address', 'Address' => array( 'StreetLines' => array(utf8_encode($street_address), utf8_encode($street_address2)), 'Company' => $order->delivery['company'], 'PostalCode' => $postcode, 'City' => $city, 'StateOrProvinceCode' => $state, 'CompanyName' => $order->delivery['company'], 'CountryCode' => $country_id ) ) ); try { $av_response = $av_client->addressValidation($av_request); if ($av_response->HighestSeverity == 'SUCCESS') { $address_validation = true; if ($av_response->AddressResults->ProposedAddressDetails->ResidentialStatus == 'BUSINESS') { $residential_address = false; $address_type = 'commercial'; tep_session_register('address_type'); }elseif(($av_response->AddressResults->ProposedAddressDetails->ResidentialStatus == 'INSUFFICIENT_DATA') || ($av_response->AddressResults->ProposedAddressDetails->ResidentialStatus == 'UNAVAILABLE') || ($av_response->AddressResults->ProposedAddressDetails->ResidentialStatus == 'NOT_APPLICABLE_TO_COUNTRY')) { $address_type = 'residential'; tep_session_register('address_type'); } } } catch (Exception $e) { } if ($address_validation == false) { if ($order->delivery['company'] != '') { $residential_address = false; } else { $residential_address = true; } } if(isset($customer_id) && ($customer_id > 0)) tep_db_query("update " . TABLE_ADDRESS_BOOK . " set entry_delivery_type = '" . tep_db_prepare_input($address_type) . "' where address_book_id = '" . (int)$order->delivery['delivery_id'] . "'"); }else{ if ($address_type == 'commercial') { $residential_address = false; } else { $residential_address = true; } } This new code work is based off of USPS tables that fedex looks up the address to find out the address type. If no type is returned and the customer has a company name then defaults to commercial, else all others are residential. hope this helps. cheers Peter
  17. Distance based shipping This module will allow you to define a set radius from 0 to any other value in your selected unit of measure imperial or metric, (base radius). This defined zone around your shipping area can have a defined cost associated with it from 0 to any other value (defined zone cost). The unit of measure will be calculated based on the per unit of measure cost that is defined in the settings section in the admin. Distance outside of this defined radius will incur charges based on the following formula: shipping cost = (define zone cost + ((total distance shipped - base radius) * per unit of measure cost) Distance is rounded up to nearest KM or mile. Requests are sent in SSL mode (I may change this later but would fully expect people to use SSL in the checkout section) Add on is found at: http://addons.oscommerce.com/info/9543 cheers Peter M
  18. We have successfully implemented UPS dimensional shipping. Did you make any changes to the UPS XML version or just implement shipping sizes in the product editing and set up the shipping sizes in the admin tool? As well did you use the same logic for the Fedex module? thanks, Peter
  19. Just curious, where did you get this module?
  20. Hi, I was looking to install this module on a site, but ran into issues with PHP compatability. In the create_order.php file, you are using : $result = $rs->fetch_all(MYSQLI_ASSOC); // line 89 which works with php 5.3 and beyond. With the 5.2 serries it has issues. I switched to an older file you have there and the drop down has some strange test options to use. On any selection I then get another error: Which again I am sure would be related to compatability issues. Will your newest version fix compatability issues? and when might you release this? Just curious if you have a time line is all. thanks Peter M PS. it is a pretty impressive piece of work still :)
  21. The latest release has an issue with the categories editing tool, it does not save the Category name or the description. No error is generated, as well the category id is not set on the redirect after the edit... cheers Peter
  22. Spring is in the air.... Is it time to clean out the code closets and see what is needed or not?

    1. MrPhil

      MrPhil

      I've got some lines of FORTRAN IV (ANSI-66) that I'll trade for a like number of COBOL.

    2. cannuck1964

      cannuck1964

      lol...I have older spaghetti basic code from vic 20 days :)

  23. Thankfully spring finilly found me .....

  24. Tax time is coming up....

    1. Mort-lemur

      Mort-lemur

      Tax need not be taxing :) I wish !

×
×
  • Create New...