osCmax v2.5 User Manual
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

edit specials.php gives error

This is a discussion on edit specials.php gives error within the osCommerce 2.2 Discussion forums, part of the osCommerce 2.2 Forums category; 1052 - Column 'products_id' in from clause is ambiguous select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL, pg.customers_group_price, p.products_price) as products_price, ...

      
  1. #1
    Member
    Join Date
    Aug 2009
    Posts
    32
    Rep Power
    0


    Default edit specials.php gives error

    1052 - Column 'products_id' in from clause is ambiguous

    select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL, pg.customers_group_price, p.products_price) as products_price, s.specials_new_products_price, s.expires_date, s.customers_group_id from products p, products_description pd, specials s LEFT JOIN products_groups pg using (products_id, customers_group_id) where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id and s.specials_id = '3'

    when I press edit on the specials page for a product, this error occurs.
    Looked everywhere and found no answer. I created the specials product from a dropdown product. I can delete the special and add it back but I do not like giving this code to my customer. Any similars?
    any fixes?
    Additional warning on admin screen "
    Warning: Division by zero in /mnt/w0209/d46/s24/b026add5/www/store/catalog/admin/specials.php on line 331"

    Last edited by shirley; 09-16-2009 at 07:56 AM.

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: edit specials.php gives error

    Simple solution - Restore file.

    What did you edit? You make an error.

    Search for
    Code:
    Get Them While They\'re Hot!
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    Member
    Join Date
    Aug 2009
    Posts
    32
    Rep Power
    0


    Unhappy Re: edit specials.php gives error

    Specials : Glenda Cason Gallery
    Above link shows my specials page with the heading changed. I am familiar with the escape character.

    The price change used '.' for the decimal (tried it several ways tho).
    I have not touched the admin/specials.php file but reloaded it anyway as per your suggestion. I believe the edit page is re-established from the database once I press edit. line 332 price is the error location so what is wrong with the special price I put in? It will not create the correct record to be edited?

    I don't do sql or much php but I can read a logic statement. I can delete the price change and re-enter it - works fine. So create is different from edit. Can you look at it again? and does your edit work fine? Maybe I need to download the oscmax files again. I am using the latest version. Also, I just looked at my Easy Populate and the record is there.
    Last edited by shirley; 09-16-2009 at 10:58 AM.

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: edit specials.php gives error

    Not sure what you mean by
    The price change used '.' for the decimal (tried it several ways tho).
    I see no issues with your site specials.

    Please explain what your tiring to do and what you want to accomplish.
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  5. #5
    Member
    Join Date
    Aug 2009
    Posts
    32
    Rep Power
    0


    Default Re: edit specials.php gives error

    "The change used '.' for the decimal (tried it several ways tho)."
    Oh, this was documented one of the specials.php about entering periods and apostrophes. Not necessary though. Forget it.
    All I tried to do was enter a product special price.
    Then I pressed the EDIT button and the SQL message above appeared.
    It looks like the program tried to divide by zero when it was bringing up the price change record again. That's all.I tried this with several products but none worked when I went to edit. I have to delete the price change and re enter it.
    Could this have something to do with my SQL version or cache?
    I can send you any of the files.
    Also, I want to show a "Fall/Monthly Specials" info box on my home page.
    I may have to create a Specials Category and move the products in there (using link, of course). Thanks,
    Last edited by shirley; 09-17-2009 at 06:18 AM.

  6. #6
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: edit specials.php gives error

    Can you re-create this issue in the TEST system below?
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  7. #7
    Member
    Join Date
    Aug 2009
    Posts
    32
    Rep Power
    0


    Default Re: edit specials.php - trying to login

    I go to the admin trying my username and password, no go

    Next, i try the admin demo demoonly and still can't get in.

    what do i do to get in to admin to test the specials edit function?

    the catalog specials looks just like mine.

    sorry to be so dense. how many files could cause this error?
    I thought I had replaced them all.

  8. #8
    Member
    Join Date
    Aug 2009
    Posts
    32
    Rep Power
    0


    Default Re: edit specials.php gives error

    Okay, I got into the admin demo site...must have been you fixing it. thanks,

    I went to the specials, pressed edit and made a price update.
    It works fine...

    Please tell me what phps I have to reload to get this going....
    languages/english/specials.php
    catalog/specials.php
    catalog/admin/specials.php
    contents/specials.tpl.php

    any more? thanks again
    I just reloaded these from my originals but no change...should I download the package files again?

    added just now...
    Here is the code from the admin specials.php that seems to be the culprit...

    <?php
    if ( ($action == 'new') || ($action == 'edit') ) {
    $form_action = 'insert';
    if ( ($action == 'edit') && isset($HTTP_GET_VARS['sID']) ) {
    $form_action = 'update';
    // BOF: MOD - Separate Pricing Per Customer



    // LINE CHANGED: Bugfix 0000061
    // $product_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, s.specials_new_products_price, s.expires_date, s.customers_group_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id and s.specials_id = '" . (int)$HTTP_GET_VARS['sID'] . "'");
    $product_query = tep_db_query("select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL, pg.customers_group_price, p.products_price) as products_price, s.specials_new_products_price, s.expires_date, s.customers_group_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using (products_id, customers_group_id) where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id and s.specials_id = '" . (int)$HTTP_GET_VARS['sID'] . "'");
    // EOF: MOD - Separate Pricing Per Customer
    Last edited by shirley; 09-17-2009 at 11:20 AM. Reason: added file code

  9. #9
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: edit specials.php gives error

    Demo site is down for a while... will (hopefully) fix later today.
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  10. #10
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: edit specials.php gives error

    Test/Demo Server back on line and refreshed too...
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

Page 1 of 2 12 LastLast

Similar Threads

  1. Syntax error for specials page
    By amandabuild in forum osCMax v2 Features Discussion
    Replies: 2
    Last Post: 11-15-2005, 06:04 AM
  2. error message when trying to edit text in file manager
    By mrdscopp in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 05-30-2005, 12:11 PM
  3. edit customer in admin error, heelllppp
    By battleaxe in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 10-07-2004, 02:38 AM
  4. How can i edit a CSS style for the specials?
    By EddyXP in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 07-06-2004, 05:33 AM
  5. Error when trying to edit customer info
    By Nugar in forum osCmax v1.7 Discussion
    Replies: 9
    Last Post: 11-13-2003, 11:01 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
  •