Get the book

Go Back   Zen Cart Support > Upgrading Your Zen Cart > Upgrading from 1.3.x to 1.3.8

Upgrading from 1.3.x to 1.3.8 Questions and discussion related to upgrading to version 1.3.8

Closed Thread
 
Thread Tools Display Modes
Old 21st May 2008, 06:41 AM   #21
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 51,207
Default Re: Known Bugs (and fixes) with v1.3.8

Problem: TEXT Attributes set to TEXTAREA with a limit on number of characters will delete the initially typed text when the maximum number of characters has been reached ...

Example: Maximum is set to 200 and the 201 character is typed and the first 200 characters get deleted when the warning is displayed ...

Solution:
Edit /includes/modules/pages/product_info/jscript_textarea_counter.js

change this:
Code:
  if (excesschars > 0) {
		field.value = field.value.substring(0, excesschars);
		alert("Error:\n\n- You are only allowed to enter up to"+maxchars+" characters.");
to this:
Code:
  if (excesschars > 0) {
		field.value = field.value.substring(0, maxchars);
		alert("Error:\n\n- You are only allowed to enter up to"+maxchars+" characters.");
Do the same for other product types if needed ...
__________________
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

Are you using the latest? Perhaps you've a problem that's fixed in --> [Upgrade today: v1.3.8a]
Officially PayPal-Certified! Just click here
Ajeh is offline  
Old 29th May 2008, 02:44 PM   #22
DrByte
Sensei
 
DrByte's Avatar
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 39,865
Default Linkpoint API Rejecting Partial Quantities

Several issues have been fixed in the LinkpointAPI payment module since v1.3.8 was first released. They are summarized here, with an updated module file:


The fixes included are:
- prevents submission of line-item details if partial quantities are entered (ie: any decimal places)
- prevents submission of line-item details if attribute content is longer than 128 characters - SGS-005000
- prevents submission of subtotal line-item details if discounts apply
- commented code can be uncommented for other OT modules such as ot_loworderfee if needed
- traps for error condition if SGS-002301 subtotal mismatch occurs
- accommodates free-shipping cases correctly
- confirmed to not croak when handling ' marks in product names

Related forum posts:
http://www.zen-cart.com/forum/showthread.php?t=98895
http://www.zen-cart.com/forum/showthread.php?t=87388
http://www.zen-cart.com/forum/showthread.php?t=88813
http://www.zen-cart.com/forum/showthread.php?t=87901
http://www.zen-cart.com/forum/showthread.php?t=94387


The following file, after unzipping, simply replaces your existing /includes/modules/payment/linkpoint_api.php file:
Attached Files
File Type: zip linkpoint_api.php.zip (13.6 KB, 725 views)
__________________
Zen Cart - putting the dream of business ownership within reach of anyone!
DrByte is offline  
Old 14th June 2008, 01:51 AM   #23
DrByte
Sensei
 
DrByte's Avatar
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 39,865
Default queryFactory error on PHP5 in banner_monthly.php

This bug isn't unique to v1.3.8 (has existed for many versions) but only shows in PHP5.

Symptom:
Fatal error: Cannot use object of type queryFactoryResult as array in /home/mydomain/public_html/admin/includes/graphs/banner_monthly.php on line 41

Solution:
Edit /admin/includes/graphs/banner_monthly.php ... line 41
Add the text as shown:
Code:
  $graph->SetTitle(sprintf(TEXT_BANNERS_MONTHLY_STATISTICS, $banner->fields['banners_title'], $year));
__________________
Zen Cart - putting the dream of business ownership within reach of anyone!
DrByte is offline  
Old 12th September 2008, 10:02 PM   #24
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 51,207
Default Re: Known Bugs (and fixes) with v1.3.8

Problem: Minimum or Maximum or Units is not processing with attributes properly when added to cart ... also affects quantity discounts on mixed

Solution:
/includes/classes/shopping_cart.php
at lines 1401 and 1435 you have code that looks like this:
Code:
    // reset($this->contents); // breaks cart
    $check_contents = $this->contents;
    while (list($products_id, ) = each($check_contents)) {
add an extra line in both places, making it look like this:
Code:
    // reset($this->contents); // breaks cart
    $check_contents = $this->contents;
    reset($check_contents);
    while (list($products_id, ) = each($check_contents)) {
__________________
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

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

Last edited by Ajeh; 30th June 2009 at 10:26 PM. Reason: adding more key words :)
Ajeh is offline  
Old 16th September 2008, 07:12 PM   #25
DrByte
Sensei
 
DrByte's Avatar
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 39,865
Default Re: Known Bugs (and fixes) with v1.3.8

ISSUE WITH GODADDY HOSTING CUSTOMERS VS PAYPAL

GoDaddy has made a change to their server configuration so that their proxy servers are no longer required.

The fix:
1. IF YOU ARE USING GODADDY HOSTING, go to Admin->Configuration->My Store->CURL Proxy Status, and turn it off.

That should be enough.




Alternate, "fix" which should *NOT* be needed:
2. THE FOLLOWING SHOULD NOT BE REQUIRED, but is left for reference:
This change in proxy configuration breaks the bandages originally added to the PayPal IPN handling to accommodate the need for the proxy ... and thus breaks the ability of the PayPal modules to receive updates from PayPal regarding transactions made in your stores.

This affects all the PayPal modules, and is unique to GoDaddy hosting accounts.
a) PayPal Website Payments Standard (IPN) transactions will not register in your store at all.
b) PayPal Website Payments Pro transactions will not see updates made such as refunds.
c) Express Checkout transactions will not show updates made such as refunds

The quick workaround to this is to make two small edits to one file:

/includes/modules/payment/paypal/paypal_functions.php
Around line 443 you'll see the following section of code.
Make the changes by adding the text shown in red:
Code:
      $proxy = $web;
      if (false && CURL_PROXY_REQUIRED == 'True' && CURL_PROXY_SERVER_DETAILS != '') {
        $proxy = parse_url($scheme . CURL_PROXY_SERVER_DETAILS);
        $ssl = ($ssl == '') ? 'http://' : $ssl;
      }

      //Post Data
      if (false && CURL_PROXY_REQUIRED == 'True' && CURL_PROXY_SERVER_DETAILS != '') {
        $header  = "POST " . $ssl . $web[host] . $web[path] . " HTTP/1.1\r\n";
        $header .= "Host: $proxy[host]\r\n";
      } else {
        $header  = "POST $web[path] HTTP/1.1\r\n";
        $header .= "Host: $web[host]\r\n";
      }
The proxy support will no longer be needed for future.
__________________
Zen Cart - putting the dream of business ownership within reach of anyone!
DrByte is offline  
Old 24th September 2008, 03:41 AM   #26
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 51,207
Default Re: Known Bugs (and fixes) with v1.3.8

Problem: Multiple Languages showing in What's New sidebox

Solution: edit the file:
/includes/modules/sideboxes/whats_new.php

Change the select statement to read:
Code:
  $random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
                                              p.master_categories_id
                           from (" . TABLE_PRODUCTS . " p
                           left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and p.products_status = 1 " . $display_limit;
__________________
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

Are you using the latest? Perhaps you've a problem that's fixed in --> [Upgrade today: v1.3.8a]
Officially PayPal-Certified! Just click here
Ajeh is offline  
Old 13th November 2008, 05:24 PM   #27
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 51,207
Default Re: Known Bugs (and fixes) with v1.3.8

Problem: In Admin customers display the right panel displays a $0.00 Gift Certificate balance when no order exists yet for a customer.

Solution: Add a function and change the display for the right panel

Add this function to the:
/admin/includes/functions/general.php

PHP Code:
    function zen_user_has_gv_balance($c_id) {
      global 
$db;
        
$gv_result $db->Execute("select amount from " TABLE_COUPON_GV_CUSTOMER " where customer_id = '" . (int)$c_id "'");
        if (
$gv_result->RecordCount() > 0) {
          if (
$gv_result->fields['amount'] > 0) {
            return 
$gv_result->fields['amount'];
          }
        }
        return 
0;
    } 
The edit the file:
/admin/customers.php

And change:
PHP Code:
        $contents[] = array('text' => '<br />' TEXT_INFO_GV_AMOUNT ' ' $currencies->format($customers_orders->fields['amount'])); 
to read:
PHP Code:
        $customer_gv_balance zen_user_has_gv_balance($cInfo->customers_id);
        
$contents[] = array('text' => '<br />' TEXT_INFO_GV_AMOUNT ' ' $currencies->format($customer_gv_balance)); 
__________________
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

Are you using the latest? Perhaps you've a problem that's fixed in --> [Upgrade today: v1.3.8a]
Officially PayPal-Certified! Just click here
Ajeh is offline  
Old 22nd December 2008, 04:26 PM   #28
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 51,207
Default Re: Known Bugs (and fixes) with v1.3.8

Problem: Sales made with Salemaker having trouble on some sales with Linked Products ...

Solution: update the code on the following files ...
Change the file:
/includes/functions/functions_lookups.php

Find the code:
Code:
/*
 * Return a product's category
 * TABLES: products_to_categories
 */
  function zen_get_products_category_id($products_id) {
    global $db;

    $the_products_category_query = "select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "'" . " order by products_id,categories_id";
    $the_products_category = $db->Execute($the_products_category_query);

    return $the_products_category->fields['categories_id'];
  }
and change to read:
Code:
/*
 * Return a product's category
 * TABLES: products_to_categories
 */
  function zen_get_products_category_id($products_id) {
    global $db;

    $the_products_category_query = "select products_id, master_categories_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'";
    $the_products_category = $db->Execute($the_products_category_query);

    return $the_products_category->fields['master_categories_id'];
  }
Then, in the Admin find the code in:
/admin/includes/functions/general.php

that reads:
Code:
////
// Return a product's category
// TABLES: products_to_categories
  function zen_get_products_category_id($products_id) {
    global $db;

    $the_products_category_query = "select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $products_id . "'" . " order by products_id,categories_id";
    $the_products_category = $db->Execute($the_products_category_query);

    return $the_products_category->fields['categories_id'];
  }
and change to read:
Code:
////
// Return a product's category
// TABLES: products_to_categories
  function zen_get_products_category_id($products_id) {
    global $db;

    $the_products_category_query = "select products_id, master_categories_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'";
    $the_products_category = $db->Execute($the_products_category_query);

    return $the_products_category->fields['master_categories_id'];
  }
__________________
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

Are you using the latest? Perhaps you've a problem that's fixed in --> [Upgrade today: v1.3.8a]
Officially PayPal-Certified! Just click here
Ajeh is offline  
Old 19th February 2009, 07:59 PM   #29
DrByte
Sensei
 
DrByte's Avatar
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 39,865
Default Group Pricing vs Shipping Tax

Problem: Group Discount being applied to shipping for VAT purposes

Resolution: http://www.zen-cart.com/forum/showth...972#post687972
__________________
Zen Cart - putting the dream of business ownership within reach of anyone!
DrByte is offline  
Old 8th March 2009, 05:45 PM   #30
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 51,207
Default Re: Known Bugs (and fixes) with v1.3.8

Problem: Looking up fields in products and products_description and looking up fields in categories and categories_description ...

There are two function in the functions_lookups that will pull any field that you need from the products or products_description tables by just passing it the products_id ... and for pulling any field from the categories and categories_description tables just by passing the categories_id ...

However there is an error in both of them that needs a minor fix ...

The original code for product lookup:
/includes/functions/functions_lookups.php
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 = '') {
    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 ='" . (int)$product_id . "'
                              and pd.language_id = '" . (int)$language . "'");

    $return_field = $product_lookup->fields['lookup_field'];

    return $return_field;
  }
The original code for category lookup :
Quote:
/*
* Return any field from categories or categories_description table
* Example: zen_categories_lookup('10', 'parent_id');
*/
function zen_categories_lookup($categories_id, $what_field = 'categories_name', $language = '') {
global $db;

if (empty($language)) $language = $_SESSION['languages_id'];

$category_lookup = $db->Execute("select " . $what_field . " as lookup_field
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where c.categories_id ='" . (int)$categories_id . "'
and cd.language_id = '" . (int)$language . "'");

$return_field = $category_lookup->fields['lookup_field'];

return $return_field;
}
However, there is a little bug in these that you will want to update:

The new code for products look up:
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 = '') {
    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 ='" . (int)$product_id . "'
                              and pd.products_id = p.products_id
                              and pd.language_id = '" . (int)$language . "'");

    $return_field = $product_lookup->fields['lookup_field'];

    return $return_field;
  }
The new code for categories look up:
Code:
/*
 * Return any field from categories or categories_description table
 * Example: zen_categories_lookup('10', 'parent_id');
 */
  function zen_categories_lookup($categories_id, $what_field = 'categories_name', $language = '') {
    global $db;

    if (empty($language)) $language = $_SESSION['languages_id'];

    $category_lookup = $db->Execute("select " . $what_field . " as lookup_field
                              from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                              where c.categories_id ='" . (int)$categories_id . "'
                              and c.categories_id = cd.categories_id
                              and cd.language_id = '" . (int)$language . "'");

    $return_field = $category_lookup->fields['lookup_field'];

    return $return_field;
  }
__________________
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

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

Last edited by Ajeh; 11th March 2009 at 12:41 AM.
Ajeh is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
UK Discounting Bugs (and associated fixes) swguy Bug Reports 1 26th May 2007 11:06 PM
Bugs Fixes? ideasgirl Bug Reports 2 19th February 2007 07:29 PM
FYI v1.3.0.2 released -- fixes several bugs DrByte Bug Reports 20 23rd June 2006 01:24 AM


All times are GMT +1. The time now is 12:49 PM.

Learn tips, tricks & secrets for your Zen Cart™
Sign up for our FREE Newsletter

Powered by vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content and Graphics Copyright (c) 2006, 2007, 2008, 2009, 2010 Zen Ventures, LLC - all rights reserved
Get Zen Cart E-Commerce Shopping Cart at SourceForge.net. Fast, secure and Free Open Source software downloads