Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

On_Sale And MAP Price Mod Problem

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #1  
Old 11-18-2007, 11:34 AM
 
Duramax 6.6L Duramax 6.6L is offline
 

X-Adept
  
Join Date: Dec 2006
Posts: 865
 

Default On_Sale And MAP Price Mod Problem

I have On-Sale and MAP Pricing Mod. Installing either one of them has know problem, but when I place both of them in the store. I am getting the following error message.

Fatal error: Cannot use string offset as an array in/include/search.php on line 960.

This refers to this line in the search.php:

if ($search_data["products"]['extra_fields'][$v['fieldid']])
$extra_fields[$k]['selected'] = 'Y';

This error seems to accur on the admin side when I try to search for products. If I search on the customer side, everything appears to be working ok.


Any ideas anyone.
__________________
Xcart 5.1.6 Building New Store
Xcart4.6.4 Gold Plus
Xcart 4.6.4 Platinum
Smart Template,
Mail Chimp Upgrade
Checkout One (One Page Checkout)
Checkout One X-Payments Connector
Checkout One Deluxe Tools
Call For Price
On Sale Module
Buy Together Module
MAP Price MOD
Reply With Quote
  #2  
Old 11-18-2007, 12:10 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: On_Sale And MAP Price Mod Problem

I was going to post this in its own bugs and fixes thread...but I'll do this now for you, and make a more formal post later.

This is all related to the serialized arrays in 4.1.9 - xcart made fundamental changes to the sql structure and they didn't tell anyone how or why.

First thing you should try: clear all cache files on your server and local browsers AND delete all cookies.

That may solve things.

Second: xcart gave me 2 patches last week... one is for /include/search.php and the other is for /admin/contact_us_profiles.php. I will post both patches later on, in their own thread... but this should get you out of the jam right now.

Regardless -- clear all cookies, cache on local browsers as well as server (or run domain.com/cleanup.php)

Please let me know if this solves your problem.


[EDIT -- use this patch at your own risk -- it may or may not work. I've asked xcart to review this. ALWAYS work on a backup!!!!]

=====================

in file /include/search.php

FIND:
Code:
if (!in_array($v['fieldid'], $tmp) && $current_area == 'C') { unset($extra_fields[$k]); continue; }

REPLACE WITH:

Code:
// BEGIN patch by xcart for 4.1.8-4.1.9 upgrade - Cannot use string offset as an array // comment out the following block- /* if (!in_array($v['fieldid'], $tmp) && $current_area == 'C') { unset($extra_fields[$k]); continue; } */ // END comment out // BEGIN new code from xcart for Cannot use string offset as an array if (!empty($tmp) && is_array($tmp) && $current_area == 'C') { if (!in_array($v['fieldid'], $tmp)) { unset($extra_fields[$k]); continue; } } // END new code from xcart for Cannot use string offset as an array
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 11-18-2007, 12:15 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: On_Sale And MAP Price Mod Problem

PS -- this bug also occurs if you have any additional product fields defined, and then search in the admin for a product (modify product, etc...)

This is not a 4.1.9 bug -- this is a bug in the upgrade from 4.1.8 (or earlier) TO 4.1.9, since the structure of the database changed, and xcart failed to account for this.

My guess is this bug will continue to pop itself up as admins upgrade their stores with non-xcart tables created in older versions. It's too bad xcart didn't give the developer community a heads up on this and seeded them with pre-release copies.

Forgot, there is no beta program. We're the beta program.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #4  
Old 11-18-2007, 12:25 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: On_Sale And MAP Price Mod Problem

PPS -- anyone using BCSE Static Pages Meta Tags Mod will also get bit by this.

The BCSE Static Pages Meta Tags Mod (free) will not work in 4.1.9 without a rewrite.

I am trying to fix the BCSE Static Pages Meta Tags Mod, but I am not having luck on my first attempt. I know very, very little about mySql and I am trying to learn a little as I go... I'll make another stab at it later tonight.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #5  
Old 11-18-2007, 02:09 PM
 
Duramax 6.6L Duramax 6.6L is offline
 

X-Adept
  
Join Date: Dec 2006
Posts: 865
 

Default Re: On_Sale And MAP Price Mod Problem

Is there any way to inport the data from an existing 4.1.8 store into a 4.1.9 clean install and keep all the info in the correct spots.

Is xcart going to correct this in the next upgade?
__________________
Xcart 5.1.6 Building New Store
Xcart4.6.4 Gold Plus
Xcart 4.6.4 Platinum
Smart Template,
Mail Chimp Upgrade
Checkout One (One Page Checkout)
Checkout One X-Payments Connector
Checkout One Deluxe Tools
Call For Price
On Sale Module
Buy Together Module
MAP Price MOD
Reply With Quote
  #6  
Old 11-18-2007, 02:51 PM
 
Duramax 6.6L Duramax 6.6L is offline
 

X-Adept
  
Join Date: Dec 2006
Posts: 865
 

Default Re: On_Sale And MAP Price Mod Problem

I just applied the patch and it didn't fix the problem. I am going to restore the backup files to remove the MAP Price Mod and see what happens.
__________________
Xcart 5.1.6 Building New Store
Xcart4.6.4 Gold Plus
Xcart 4.6.4 Platinum
Smart Template,
Mail Chimp Upgrade
Checkout One (One Page Checkout)
Checkout One X-Payments Connector
Checkout One Deluxe Tools
Call For Price
On Sale Module
Buy Together Module
MAP Price MOD
Reply With Quote
  #7  
Old 11-18-2007, 05:38 PM
 
Duramax 6.6L Duramax 6.6L is offline
 

X-Adept
  
Join Date: Dec 2006
Posts: 865
 

Default Re: On_Sale And MAP Price Mod Problem

Tried patch and recieved following error.

Fatal error: Cannot use string offset as an array in include/search.php on line 968

I deleted the extra feilds from the product listings and everything is working fine now.

xcart needs to step up and fix this problem fast, as there are quite a few users who will be having a problem with this.
__________________
Xcart 5.1.6 Building New Store
Xcart4.6.4 Gold Plus
Xcart 4.6.4 Platinum
Smart Template,
Mail Chimp Upgrade
Checkout One (One Page Checkout)
Checkout One X-Payments Connector
Checkout One Deluxe Tools
Call For Price
On Sale Module
Buy Together Module
MAP Price MOD
Reply With Quote
  #8  
Old 11-18-2007, 05:41 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: On_Sale And MAP Price Mod Problem

Trash all your cookies and empty cache (on your browser) Better?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #9  
Old 11-18-2007, 06:17 PM
 
Duramax 6.6L Duramax 6.6L is offline
 

X-Adept
  
Join Date: Dec 2006
Posts: 865
 

Default Re: On_Sale And MAP Price Mod Problem

I cleared the templates_c on the server, Cleared my browser cache. opened firefox and have the same problem.

I deleted the product extra feilds and everything is working now, except the MAP Mod

I hope they can fix this quick as I had to take 30 products of line to sell.
__________________
Xcart 5.1.6 Building New Store
Xcart4.6.4 Gold Plus
Xcart 4.6.4 Platinum
Smart Template,
Mail Chimp Upgrade
Checkout One (One Page Checkout)
Checkout One X-Payments Connector
Checkout One Deluxe Tools
Call For Price
On Sale Module
Buy Together Module
MAP Price MOD
Reply With Quote
  #10  
Old 11-18-2007, 06:25 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: On_Sale And MAP Price Mod Problem

CLEAR YOUR BROWSER COOKIES

I will guess that the MAP mod needs some re-coding as the database structure changed.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:15 PM.

   

 
X-Cart forums © 2001-2020