NVNCBL Blog

eCommerce Solutions Provider

  • Weird 403 Forbidden Errors

    If you are encountering weird 403 Forbidden errors, and tried adjusting .htaccess and file permissions -- check in the error logs to make sure that mod_security is not interfering. If it is, you may have to ask your hosting provider for assistance with the specific mod_security issue.

  • Chrome not displaying fewer than 8 characters

    I am pretty sure I have performed echo 'done'; before and seen it.  But I was running into an issue where unless there are 8 characters, it won't even show the first 7.  Very odd indeed.

  • Magento Catalog URL Rewrites Slow or Stuck in Processing

    It is possible you suffer from the Magento Catalog URL rewrite bug where a store with 7k products would see 300k rows in the core_url_rewrite table.  The patch to apply is detailed here: https://gist.github.com/edannenberg/5310008

    And copied below in case that original page disappears (some of my Magento related bookmarks have unfortunately become obsolete).

    diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php
    --- mage_org/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:48:25.679009391 +0100
    +++ src_shop/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:49:24.188005601 +0100
    @@ -643,13 +643,24 @@ class Mage_Catalog_Model_Url
    $this->_rewrite = $rewrite;
    return $requestPath;
    }
    +
    + // avoid unnecessary creation of new url_keys for duplicate url keys
    + $noSuffixPath = substr($requestPath, 0, -(strlen($suffix)));
    + $regEx = '#^('.preg_quote($noSuffixPath).')(-([0-9]+))?('.preg_quote($suffix).')#i';
    + $currentRewrite = $this->getResource()->getRewriteByIdPath($idPath, $storeId);
    + if ($currentRewrite && preg_match($regEx, $currentRewrite->getRequestPath(), $match)) {
    + $this->_rewrite = $currentRewrite;
    + return $currentRewrite->getRequestPath();
    + }
    +
    // match request_url abcdef1234(-12)(.html) pattern
    $match = array();
    $regularExpression = '#^([0-9a-z/-]+?)(-([0-9]+))?('.preg_quote($suffix).')?$#i';
    if (!preg_match($regularExpression, $requestPath, $match)) {
    return $this->getUnusedPath($storeId, '-', $idPath);
    }
    - $match[1] = $match[1] . '-';
    + $match[1] = $noSuffixPath . '-'; // always use full prefix of url_key
    + unset($match[3]); // don't start counting with a possible number in the url_key
    $match[4] = isset($match[4]) ? $match[4] : '';

    $lastRequestPath = $this->getResource()

  • console.log and IE8, IE9

    Wow, ashamedly just discovered that console.log is not cross browser safe. Should check for the existence of console object first. May even be better to append text to a hidden <div> to be completely safe.

    In the words of "f055" on this page http://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function:

    I can un-proudly say that for the many years I developed for the web I assumed console.log is supported by all major browsers. I just spent a day working out why IE9 doesn't like my script and now I know why - it had a console.log in the very first step. Impossible to debug, since turning debug mode made this bug go away in an instant :P Thanks for clarification!!

  • Gateway Error Unable to Read Response or Response is Empty

    Your server might have curl enabled, but it is still unable to reach the authorize.net server, or any other server for that matter.

    First -- Check your phpinfo() readout and see if "curl_exec" is in the list of disabled_functions. Enlist the help of your hosting provider to get "curl_exec" allowed.

    Alternatively -- Adjust the _trySetCurlAdapter function within Varien_Http_Client so it not only looks for whether lib_curl is enabled, but also checks whether curl_exec is allowed.

  • Timing your SSL Certificate Expiration

    The holiday season is a bad time for your SSL certificate to expire. After sending out a Black Friday email blast, the last thing you want your customers to see is a warning about an unsecured connection! Adjust the expiration so it occurs off peak or better yet, set a calendar reminder a few days in advance. Happy selling!

  • Slow Chrome

    Chrome performance issue of lagging accompanied by 100% disk usage for a few seconds was resolved for me by disabling hardware acceleration. Version of Chrome: 38.

    Navigate to chrome://settings/ > Show advanced settings ... > System > [uncheck] Use hardware acceleration when available.

  • Heartland Secure Submit - ApiConnectionException

    If during checkout you are getting the error "Unable to process the payment transaction", and if you find "ApiConnectionException: Unable to process the payment transaction." in var/log assuming you have Debug = Yes, try adding:

    curl_setopt($soap_do, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);

    to lib/SecureSubmit/services/HpsService.php around line 70 such that:

    $soap_do = curl_init();
    curl_setopt($soap_do, CURLOPT_URL, $this->_gatewayUrlForKey($this->config->secretApiKey));
    curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 10);
    curl_setopt($soap_do, CURLOPT_TIMEOUT, 10);
    curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true );
    curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($soap_do, CURLOPT_POST, true);
    curl_setopt($soap_do, CURLOPT_POSTFIELDS, $xml->saveXML());
    curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header);

    if($this->config->useProxy){
    curl_setopt($soap_do, CURLOPT_PROXY, $this->config->proxyOptions['proxy_host']);
    curl_setopt($soap_do, CURLOPT_PROXYPORT, $this->config->proxyOptions['proxy_port']);
    }

    becomes:

    $soap_do = curl_init();
    curl_setopt($soap_do, CURLOPT_URL, $this->_gatewayUrlForKey($this->config->secretApiKey));
    curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 10);
    curl_setopt($soap_do, CURLOPT_TIMEOUT, 10);
    curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true );
    curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($soap_do, CURLOPT_POST, true);
    curl_setopt($soap_do, CURLOPT_POSTFIELDS, $xml->saveXML());
    curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header);
    curl_setopt($soap_do, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS); // CUSTOM

    if($this->config->useProxy){
    curl_setopt($soap_do, CURLOPT_PROXY, $this->config->proxyOptions['proxy_host']);
    curl_setopt($soap_do, CURLOPT_PROXYPORT, $this->config->proxyOptions['proxy_port']);
    }

    Hope this helps!

  • Magento checkout -- Please enter valid details

    This can happen when you have allowed multiple credit card payment methods to be selected while using OneStepCheckout.

    The issue is officially known by the makers of OneStepCheckout -- more details here: http://www.onestepcheckout.com/wiki/index.php/Credit_card_payments_are_failing_to_validate

    I am writing this entry because I searched Google for "Please enter valid details" and the results were unsatisfactory.  Hopefully this well help.

Items 1 to 9 of 59 total

Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. ...
  7. 7

About NVNCBL

Quick Support