Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2011
    Posts
    4
    Plugin Contributions
    0

    Default Data not getting saved to database

    Hello Everyone,

    We are currently experiencing a problem with our site. When our customers upload images to our site, it is saved to the correct folder directory but the file image name is not saved to the database. So we are not able to know which image goes to which order. The problem started when our hosting company started moving our site to cpanel. However, I am pretty sure we undid everything that they did but the problem still occurs.

    image adress is coming empty, main problem is that let me show you go to styleflip.com and then click on product>Style it>save(in flash designer)>add to cart>click on broken image.... that is the problem...
    Image information is not saving to SQL.

    Our admin thinks it is this:
    1. Was PHP set initially as the built-in apache module or to use suPHP instead?

    2. Any custom php settings to be preserved on the server side? Eg register_globals or magic-quotes.

    3. Please add the functionality how the images on the checkout are retrieved and show the output and errors in a log file (specify the exact location of it) or on the screen. That should do the checks if before the checkout page is showed the passed variables are missed

    4. Please specify which exactly file you’re using as the config of the phpthumb. The files get generated on the server, although the folders and files permissions were initially wrong. Having files with the owner nobody or insecure (777) permissions set will cause all sorts of errors on it.

    #1 and #2 could be the issue. #2 especially. #3 and #4 are not the cause.

    #1: PHP's been set as suPHP the whole time.
    #2: I've replicated all the php.ini settings from the old styleflip host. The problem persists.
    #3: The problem is happening deep within the zen-cart code. I'll have to spend a lot more time running through this code.
    #4: It's not phpThumb's problem. The data is not being stored by Zen Cart.

    It has nothing to do with phpThumb, don't worry about that.

    The issue is in how zen cart is saving the text option values to the session. It's saving an index to the values, but not the values themselves.

    the site is hosted & managed by Singlehop, site is styleflip.com. here is server information:

    Server Host: server.vitalculture.com (173.236.30.50) Database Host: localhost (127.0.0.1)
    Server OS: Linux 2.6.18-194.11.1.el5 Database: MySQL 5.0.91-community
    Server Date: 01/19/2011 08:31:44 Database Date: 01/19/2011 08:31:44
    Server Up Time: 08:31:44 up 90 days, 17:01, 2 users, load average: 0.00, 0.22, 0.17 HTTP Server: Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
    PHP Version: 5.2.16 (Zend: 2.2.0) PHP Memory Limit: 2048M PHP Safe Mode: Off
    PHP File Uploads: On Max Size: 100M POST Max Size: 100M
    Database Data Size: 19,888 kB Database Index Size: 4,915 kB

    Any help with this will be greatly appreciated.
    thanks in advanced.
    Mike

  2. #2
    Join Date
    Jan 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Data not getting saved to database

    Anyone have any suggestions on this?

  3. #3
    Join Date
    Jan 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Data not getting saved to database

    I still can't figure this out, please help

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Data not getting saved to database

    Quote Originally Posted by tadr0002 View Post
    When our customers upload images to our site, it is saved to the correct folder directory but the file image name is not saved to the database. So we are not able to know which image goes to which order.
    A default zencart installation doesn't have any functionality that allows customers to upload images. This means that there isn't going to be anywhere in the default database to store the file name(s) for the order(s) either.

    Therefore, for you to have this functionlity you would have had to install a 3rd party module that introduces the upload feature AND the related database tables and associated code to populate the table(s).

    I suggest you identify and re-install this module because *that* is where your problem is..

    Cheers
    Rod

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

    Default Re: Data not getting saved to database

    Actually, you could peek at the Attributes for uploads on a Product ...

    In the Tutorials/FAQS and on the forums you should find more information about:
    Attribute
    Upload
    Option Name
    Option Value

    By using the Option Name with an Option Type of File you can create Attributes on your Products so that customers can upload files with the Products ...
    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!]
    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!

  6. #6
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Data not getting saved to database

    Quote Originally Posted by Ajeh View Post
    By using the Option Name with an Option Type of File you can create Attributes on your Products so that customers can upload files with the Products ...
    Well, I'll be darned ... After using zencart for over 4 years I've never stumbled across this option before. (I guess I've never needed it)

    Apologies for leading anyone astray.

    However, in regards to tadr0002's problem I'm not convinced that this new found knowlege will be of much help on account of the fact that a quick look at the site in question indicated that some sort of flash interface is being used rather than the attributes method. Perhaps the OP isn't aware of this option either, or perhaps they find their method better (when it works).

    Anyway, thanks for setting me straight Ajeh, tis much appreciated.

    Cheers
    Rod

  7. #7
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: Data not getting saved to database

    See also the Band Signup mod (aka custom forms - data collection) forum

    http://www.zen-cart.com/forum/showpo...&postcount=171

  8. #8
    Join Date
    Dec 2007
    Posts
    21
    Plugin Contributions
    0

    Default Re: Data not getting saved to database

    Hey guys. I'm the dude that did the dev for our site. We've got a rather custom built application that uses ZenCart in a silly way. We add an intermediate step between clicking the "add to cart" button and the actual shopping_cart_default "add to cart" php action.

    Take a look at www.styleflip.com for an example, choose any product and then select any face. Our flash designer application loads and let's you customize a design. When you hit 'save' from the flash application, it sends a form post to my own custom page flash_designer_save this script saves all the asset information to a custom table. It also calls
    Code:
    $_SESSION['cart']->add_cart($productId, $_SESSION['cart']->get_quantity(zen_get_uprid($productId, $real_ids))+($new_qty), $real_ids);
    and redirects to the cart page.

    When looking at the cart page, I've noticed the following:
    If I do a print_r($products); in the header_php.php for shopping_cart, I'll see the 'attributes' array but there won't be any values set for attributes_values.

    So, the real question is, why isn't attributes_values being populated? What might cause this to happen?

  9. #9
    Join Date
    Dec 2007
    Posts
    21
    Plugin Contributions
    0

    Default Re: Data not getting saved to database

    HEY GUYS. I figured it out... Our configuration table didn't have an entry for TEXT_PREFIX.

 

 

Similar Threads

  1. Replies: 5
    Last Post: 28 Sep 2010, 05:34 AM
  2. eCheck Payments Data not going to database (not paypal)
    By kappaluppa in forum General Questions
    Replies: 3
    Last Post: 15 Apr 2008, 10:51 PM
  3. Shipping address the same as billing - Data not saved
    By SysFix in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 6 Mar 2008, 12:21 PM
  4. Not getting new data from database
    By StevenB in forum General Questions
    Replies: 0
    Last Post: 16 Apr 2007, 02:18 AM

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