Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 42
  1. #31
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Known Bugs (and fixes) with v1.3.8

    Problem: Lookup of fields in products or products_description by products_id in the Admin

    Solution: change the function file:
    /admin/includes/functions/general.php

    from approximately lines 3120 to 3138 where it reads:
    Code:
    ////
    // return any field from products or products_description table
    // Example: zen_products_lookup('3', 'products_date_added');
    //  function zen_products_lookup($product_id, $what_field = 'products_name', $language = $_SESSION['languages_id']) {
      function zen_products_lookup($product_id, $what_field = 'products_name', $language = '') {
        global $db;
    
        if (empty($language)) $language = $_SESSION['languages_id'];
    
        $product_lookup = $db->Execute("select " . $what_field . " as lookup_field
                                  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                                  where p.products_id ='" . $product_id . "'
                                  and pd.language_id = '" . $language . "'");
    
        $return_field = $product_lookup->fields['lookup_field'];
    
        return $return_field;
      }
    To read:
    Code:
    ////
    // return any field from products or products_description table
    // Example: zen_products_lookup('3', 'products_date_added');
    //  function zen_products_lookup($product_id, $what_field = 'products_name', $language = $_SESSION['languages_id']) {
      function zen_products_lookup($product_id, $what_field = 'products_name', $language = '') {
        global $db;
    
        if (empty($language)) $language = $_SESSION['languages_id'];
    
        $product_lookup = $db->Execute("select " . $what_field . " as lookup_field
                                  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                                  where  p.products_id ='" . $product_id . "'
                                  and pd.products_id = p.products_id
                                  and pd.language_id = '" . $language . "'");
    
        $return_field = $product_lookup->fields['lookup_field'];
    
        return $return_field;
      }
    Thanks for catching the forgotten update, torvista ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  2. #32
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default PayPal IPN transactions not storing properly

    Symptom: PayPal Website Payments Standard transcations not completing properly and the following PHP error occurs while processing the IPN notification:
    PHP Fatal error: Call to a member function add() on a non-object in /includes/functions/functions_email.php on line 287
    Workaround: To attempt to stop the "fatal" error when the email error occurs, try the following:
    Edit /includes/auto_loaders/paypal_ipn.core.php
    and add this to the end of the file (and remove the ?> on the last line if it exists in the file):
    Code:
    /**
     * Breakpoint 130.
     *
     * messageStack = new messageStack();
     *
     */
      $autoLoadConfig[130][] = array('autoType'=>'classInstantiate',
                                     'className'=>'messageStack',
                                     'objectName'=>'messageStack');
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #33
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default problem in ot_gv shows MySQL error when redeeming invalid GV code

    Problem: Attempting to redeem a gift certificate using an invalid code can cause a MySQL error to appear.

    Solution: Make the following code change:
    Edit /includes/modules/order_total/ot_gv.php
    Around line 219 you'll see this section of code:
    Code:
          // check for validity
          $gv_result = $db->Execute("select coupon_id, coupon_type, coupon_amount from " . TABLE_COUPONS . " where coupon_code = '" . zen_db_prepare_input($_POST['gv_redeem_code']) . "'");
    Add the new line as shown:
    Code:
          // check for validity
          $_POST['gv_redeem_code'] = preg_replace('/[^0-9a-zA-Z]/', '', $_POST['gv_redeem_code']);
          $gv_result = $db->Execute("select coupon_id, coupon_type, coupon_amount from " . TABLE_COUPONS . " where coupon_code = '" . zen_db_prepare_input($_POST['gv_redeem_code']) . "'");
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #34
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Known Bugs (and fixes) with v1.3.8

    Problem:
    "1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0, 0' at line 11"

    This can also result in PCI scans failing.

    Discussed in more detail here: http://www.zen-cart.com/forum/showthread.php?t=108941

    Cause:
    If you set any of the Admin->Configuration->Maximum Values to zero, the above situation may occur.

    Fix:
    There are a few ways to avert this situation:

    a) Don't set Maximum Value settings to 0.

    b) Change /includes/classes/split_page_results.php to detect 0 values and assign something different if that happens:
    At line 25 find this section, and insert the new line as highlighted:
    Code:
      /* class constructor */
      function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page', $debug = false) {
        global $db;
        $max_rows = ($max_rows == '' || $max_rows == 0) ? 20 : $max_rows;
        $this->sql_query = $query;
        $this->page_name = $page_holder;
    c) Change /includes/classes/split_page_results.php to handle the "-0" situation more gracefully if it ever occurs:
    At line 84, find this:
    Code:
        // fix offset error on some versions
        if ($offset < 0) { $offset = 0; }
    
        $this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;
      }
    and change it to this:
    Code:
          // fix offset error on some versions
        if ($offset <= 0) { $offset = 0; }
    
        $this->sql_query .= " limit " . ($offset > 0 ? $offset . ", " : '') . $this->number_of_rows_per_page;
    }
    I recommend implementing all three
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #35
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Shipping module not honoring tax_basis setting

    Problem: Shipping module tax calculations not honoring the tax_basis flag setting.

    Solution: Small code change posted here: http://www.zen-cart.com/forum/showthread.php?t=133906
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #36
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default 10413 errors with PayPal Express Checkout

    There are some cases when a 10413 error will occur with a PayPal Express Checkout transaction. It seems to be associated mostly with stores who use the tax-included pricing option.

    A workaround which has produced moderate success is this:
    edit /includes/modules/payment/paypalwpp.php
    around line 535 you'll see:
    Code:
          $response = $doPayPal->DoExpressCheckoutPayment($_SESSION['paypal_ec_token'],
                                                          $_SESSION['paypal_ec_payer_id'],
                                                          number_format((isset($options['AMT']) ? $options['AMT'] : $order_amount), 2),
                                                          $options);
    Change that by adding/editing as follows:
    Code:
          if (!isset($options['AMT'])) $options['AMT'] = number_format($order_amount, 2, '.', '');
          $response = $doPayPal->DoExpressCheckoutPayment($_SESSION['paypal_ec_token'],
                                                          $_SESSION['paypal_ec_payer_id'],
                                                          $options['AMT'],
                                                          $options);
    Additionally, MAKE SURE you have the ot_subtotal module enabled in Admin->Modules->Order Total.

    Fix inspired by a thought by lsenft
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #37
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Known Bugs (and fixes) with v1.3.8 / v1.3.8a

    Problem: Discount Coupon Category Restrictions are not always working right ...

    Solution: change a function in:
    /includes/functions/functions_general.php

    around lines 856 - 879 with:
    Code:
      function validate_for_category($product_id, $coupon_id) {
        global $db;
        $retVal = 'none';
        $productCatPath = zen_get_product_path($product_id);
        $catPathArray = array_reverse(explode('_', $productCatPath));
        $sql = "SELECT count(*) AS total
                FROM " . TABLE_COUPON_RESTRICT . "
                WHERE category_id = -1
                AND coupon_restrict = 'Y'
                AND coupon_id = " . (int)$coupon_id . " LIMIT 1";
        $checkQuery = $db->execute($sql);
        foreach ($catPathArray as $catPath) {
          $sql = "SELECT * FROM " . TABLE_COUPON_RESTRICT . "
                  WHERE category_id = " . (int)$catPath . "
                  AND coupon_id = " . (int)$coupon_id;
          $result = $db->execute($sql);
          if ($result->recordCount() > 0 && $result->fields['coupon_restrict'] == 'N') return true;
          if ($result->recordCount() > 0 && $result->fields['coupon_restrict'] == 'Y') return false;
        }
        if ($checkQuery->fields['total'] > 0) {
          return false;
        } else {
          return 'none';
        }
      }
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #38
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Setting payment modules to "enabled=false" instead of Removing sometimes causes probs

    Symptom: An order is received, but is marked as being paid-for via a module whose "Enabled" status was set to "False".

    Solutions: There are two recommended steps:

    1. If you are NOT using a given module on your site, then click Remove.
    Leaving it active with only setting its "enabled" status to "false" causes the system to have to process that module's code even though it's false. The only reason to leave it installed but left as enabled=false is if you have added custom code to the module to have it self-enable only during certain circumstances. Otherwise the module should be Remove by clicking the Remove button.

    2. Make the following code edit to help the system handle exceptions more consistently:

    /includes/classes/payment.php
    Change line 74:
    Code:
            $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];
    By replacing that one line with these several lines:
    Code:
            $paymentClass = new $include_modules[$i]['class'];
            if ($paymentClass->enabled)
            {
              $GLOBALS[$include_modules[$i]['class']] = $paymentClass;
            }
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #39
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default JPY currency problem in PayPal Express Checkout

    Problem: Submitting PayPal Express Checkout transactions in JPY currency may have problems if currency exchange happens based on exchange rates for JPY that are not whole numbers.

    Solution: Minor code change as posted here: http://www.zen-cart.com/forum/showpo...4&postcount=14
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #40
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Known Bugs (and fixes) with v1.3.8 / v1.3.8a

    Problem: Issues where adding Product with Attributes adds to the quantity of the same Product with a different Attribute combination ...

    Solution: Update the function zen_get_uprid in the file:
    /includes/functions/functions_general.php

    and change the function:
    Code:
    ////
    // Return a product ID with attributes
      function zen_get_uprid($prid, $params) {
    //print_r($params);
        $uprid = $prid;
        if ( (is_array($params)) && (!strstr($prid, ':')) ) {
          while (list($option, $value) = each($params)) {
            if (is_array($value)) {
              while (list($opt, $val) = each($value)) {
                $uprid = $uprid . '{' . $option . '}' . trim($opt);
              }
              break;
            }
            //CLR 030714 Add processing around $value. This is needed for text attributes.
            $uprid = $uprid . '{' . $option . '}' . trim($value);
          }
        //CLR 030228 Add else stmt to process product ids passed in by other routines.
          $md_uprid = '';
    
          $md_uprid = md5($uprid);
          return $prid . ':' . $md_uprid;
        } else {
          return $prid;
        }
      }
    to read:
    Code:
    ////
    // Return a product ID with attributes
      function zen_get_uprid($prid, $params) {
    //print_r($params);
        $uprid = $prid;
        if ( (is_array($params)) && (!strstr($prid, ':')) ) {
          while (list($option, $value) = each($params)) {
            if (is_array($value)) {
              while (list($opt, $val) = each($value)) {
                $uprid = $uprid . '{' . $option . '}' . trim($opt);
              }
            } else {
            //CLR 030714 Add processing around $value. This is needed for text attributes.
                $uprid = $uprid . '{' . $option . '}' . trim($value);
            }
          }      //CLR 030228 Add else stmt to process product ids passed in by other routines.
          $md_uprid = '';
    
          $md_uprid = md5($uprid);
          return $prid . ':' . $md_uprid;
        } else {
          return $prid;
        }
      }
    thanks to more-solutions for bringing this to our attention with a solution to correct the problem ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 4 of 5 FirstFirst ... 2345 LastLast

Similar Threads

  1. v155 Known Bugs (and fixes) with v1.5.5 , a, b, c, d, e, f
    By DrByte in forum Upgrading to 1.5.x
    Replies: 17
    Last Post: 16 Aug 2017, 03:25 AM
  2. v153 Known Bugs (and fixes) with v1.5.3
    By swguy in forum Upgrading to 1.5.x
    Replies: 9
    Last Post: 18 Oct 2016, 06:17 PM
  3. v151 Known Bugs (and fixes) with v1.5.1
    By DrByte in forum Upgrading to 1.5.x
    Replies: 4
    Last Post: 18 Oct 2016, 06:17 PM
  4. v150 Known Bugs (and fixes) with v1.5.0
    By DrByte in forum Upgrading to 1.5.x
    Replies: 5
    Last Post: 18 Oct 2016, 06:17 PM
  5. Known Bugs (and fixes) with v1.3.9
    By DrByte in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 31 Oct 2010, 01:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR