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

Parts of customer interface not showing!?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-20-2004, 09:57 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default Parts of customer interface not showing!?

I just started having a problem, where some customers come into my store and on any product page or cart page, the template labels are missing next to form fields. It seems like maybe it's my language variables that are not being substituted properly in the templates. All the product info is there, and the product review info shows up, but the labels for the product review form are missing, the "add to cart" label next to the go button and the "submit" button are all missing their info. I have tried to duplicate the problem on my machine with no success. I've tried in explorer and Mozilla. The customer has tried from his home and office computers with both Explorer (version 6.0.2800.1106.xpsp2...) and a new version of Mozilla. He sees broken pages everywhere. I cannot get it to happen on my machine. Could someone please check our store and see if they see any problems, or if you have a suggestion, I'd love to hear it. Here's the address...click on a product and let me know if you see any broken areas of the page.

http://www.realestate-school.com/online-store

here's a page that the customer said was broken:
http://www.realestate-school.com/online-store/customer/product.php?productid=98
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote
  #2  
Old 04-20-2004, 11:02 AM
 
blue-dreamer blue-dreamer is offline
 

eXpert
  
Join Date: Dec 2002
Location: Northampton UK
Posts: 213
 

Default

I see what you mean, it's mssing for me (IE6/WinXP).

If you are sure all the language variables are there and in the templates try flushing out the templates cache (Admin>Administrators menu >Summary at the bottom of the page)
Reply With Quote
  #3  
Old 04-20-2004, 11:42 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default

Thanks for checking on it for me. I've already cleared my template cache...several times. Don't know what's up with this but it's apparently affecting many of our customers. I just can't find any problem with the templates....I haven't made any changes to the live pages in quite a while. I'm not seeing any problems on my machine using IE6 or Mozilla. Hmmmm.....could you maybe view the source and send me a copy of the HTML via e-mail? I think that's my only hope of being able to see what's going wrong.

You can e-mail me directly at brett@realestate-school.com.
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote
  #4  
Old 04-20-2004, 12:20 PM
 
blue-dreamer blue-dreamer is offline
 

eXpert
  
Join Date: Dec 2002
Location: Northampton UK
Posts: 213
 

Default

You have mail!
Reply With Quote
  #5  
Old 04-20-2004, 01:16 PM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default

I think I have narrowed it down to a MySQL error. I found this in my error logs....
Quote:
[Tue Apr 20 15:12:15 2004] [error] PHP Warning: mysql_select_db(): A link to the server could not be established in /home/minorgod/public_html/online-store/include/func.php on line 10
[Tue Apr 20 15:12:15 2004] [error] PHP Warning: mysql_select_db(): Can't create a new thread (errno 12). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug in /home/minorgod/public_html/online-store/include/func.php on line 10
[Tue Apr 20 15:12:15 2004] [error] PHP Warning: mysql_connect(): Can't create a new thread (errno 12). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug in /home/minorgod/public_html/online-store/include/func.php on line 6

So maybe it's a server problem or due to an automatic MySQL upgrade at my web host. I'm looking into it now and will post my findings.
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote
  #6  
Old 04-21-2004, 06:56 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default

Okay, so now I've discovered that the problem wasn't realated to the above errors. It turns out that for some reason the default store language was not being selected for users who had not already received a cookie to set their default language. I discovered this after I deleted all my browser cookies and then was finally able to reproduce the problem in my store. After running the pages in my remote debugger (PHPed rocks for this) I discovered that the /include/get_language.php file was the culprit. The problems seem to start on line 15 where it says
Code:
$customer_language = func_get_language ($store_language); if (!$customer_language]) { $store_language = $config["default_customer_language"]; $customer_language = func_get_language ($store_language); }

It seems that the $customer language variable was returning a 1 element array with an empty key name and an empty string as the value. So in the next line it was skipping the default language assignment. I don't know why this just started happening, but I fixed it by changing the code to
Code:
$customer_language = func_get_language ($store_language); if (!$customer_language || empty($customer_language[0])) { $store_language = $config["default_customer_language"]; $customer_language = func_get_language ($store_language); }
It's a dirty hack, but since I can't figure out why it broke in the first place I have no alternative but to use this hack.
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote
  #7  
Old 04-21-2004, 07:14 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default

SUCCESS! I finally found the culprit. I had an empty language variable in my database and it was causing all the problems!!! So, let that be a lesson to you.

My code change above will protect your store from blank language variables in your database, at least in older versions. Since the new x-cart code often doesn't return arrays with a [0] element, it might not be so good for newer installations, but it will make your cart bulletproof from empty language variables in older carts.
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote
  #8  
Old 04-21-2004, 07:53 AM
 
blue-dreamer blue-dreamer is offline
 

eXpert
  
Join Date: Dec 2002
Location: Northampton UK
Posts: 213
 

Default

Glad you got it sorted!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:58 AM.

   

 
X-Cart forums © 2001-2020