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

Need help on new products page and admin/customers/create account page

This is a discussion on Need help on new products page and admin/customers/create account page within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; Hi, I have 2 questions about the Oscmax 2.5 beta 3. 1. When I click on the arrow button at ...

      
  1. #1
    New Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0


    Default Need help on new products page and admin/customers/create account page

    Hi,

    I have 2 questions about the Oscmax 2.5 beta 3.

    1. When I click on the arrow button at the What's New box at the home page, it displays the products by products_date_added in descending order. The older product is displayed first. I want to display the latest added products first. I tried to modified the catalog/index.php from line 283. But nothing happened.

    The original code is:
    if (isset($_GET['new_products']) && tep_not_null($_GET['new_products'])) {
    $new_products_sort = "products_date_added,";
    } else {
    $new_products_sort = "";
    }

    Modified code is:
    if (isset($_GET['new_products']) && tep_not_null($_GET['new_products'])) {
    $new_products_sort = "products_date_added," . ($sort_order == 'asc');
    } else {
    $new_products_sort = "";
    }

    The code didn't generate any errors but the sort order is not working too. My code is not correct. Can someone help me on this to sort the product from the latest?

    2. At the Admin/Customers/Create Account, how can I set the default country from the country drop down list. For example, I want to set Canada as the default country.

    Thanks!

  2. #2
    New Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0


    Default Re: Need help on new products page and admin/customers/create account page

    I found a way to fix the problem in question 1. The correct code is

    if (isset($_GET['new_products']) && tep_not_null($_GET['new_products'])) {
    $new_products_sort = "products_date_added DESC,";
    } else {
    $new_products_sort = "";
    }

    I think this a good idea you can change the catalog/index.php with the above code for the next release.

    For my question 2, since it's use Ajax, I have no clue on setting the default country. Can somone help? Thanks!

  3. #3
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Lightbulb Re: Need help on new products page and admin/customers/create account page

    Quote Originally Posted by tsui3276 View Post
    2. At the Admin/Customers/Create Account, how can I set the default country from the country drop down list. For example, I want to set Canada as the default country.
    http://wiki.oscdox.com/uk_store
    Hosting plans with installation, configuration, contributions, support and maintenance.

  4. #4
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Need help on new products page and admin/customers/create account page

    The sort order is a bug - my fault forgot to put 'desc' after to my new code!

    If you find something like this please post it in the bugtracker ... It is more likely to get picked up and fixed ... (especially since you have found the error and posted the code to fix it!)

    Anyway ... I have switched the sort order to display in descending order (ie. most recent new product first).

    Bug Fix: r1152 - oscmax2 - Project Hosting on Google Code

    Regards,
    pgmarshall
    _______________________________

  5. #5
    New Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0


    Default Re: Need help on new products page and admin/customers/create account page

    Thanks ridexbuilder,

    Quote Originally Posted by ridexbuilder View Post
    The link is not suitable for OSCMAX 2.5 beta 3, the catalog/includes/languages/english.php is no longer exist. And it only shows how to set default country for the front end which means before login. I need to create account from the admin.

    I think I need to modify the codes of admin/includes/modules/account_details.php but just have no clue of how to change it. I guess the below 2 lines need to be modified. Any suggestions?

    $countries = tep_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "' and active = 1 order by countries_name");

    $countries = tep_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " where active = 1 order by countries_name");


    Thanks!

  6. #6
    New Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0


    Default Re: Need help on new products page and admin/customers/create account page

    Thanks ridexbuilder. The link is a bit outdated because it's not for oscmax 2.5 beta 3. I couldn't find catalog/includes/languages/english.php. Also the method is not for the admin/create_account.php. I need to create new account from the admin area and would like to set the default country to Canada.

    I think I need to modify the codes at admin/includes/modules/account_details.php. But I just couldn't figure out how. Please help!

  7. #7
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Default Re: Need help on new products page and admin/customers/create account page

    english.php is now core.php (I was doing the same yesterday)
    Due to 2.5 being only beta status, us guys are still updating the wiki, as well as backfilling for 2.0.25
    [UK/US switching is now inbuilt, so that particular wiki article needs revamped]
    Last edited by ridexbuilder; 02-19-2011 at 01:16 AM.
    Hosting plans with installation, configuration, contributions, support and maintenance.

  8. #8
    New Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0


    Default Re: Need help on new products page and admin/customers/create account page

    I've made the change on the core.php.

    I change define ('DEFAULT_COUNTRY', '223'); to define ('DEFAULT_COUNTRY', '38'); and it works only when user tries to access the catalog/create_account.php. However, when user try to access the admin/create_account.php, the default is not set. The codes at admin/includes/modules/account_details.php needs to be modified but I don't know how.

  9. #9
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Need help on new products page and admin/customers/create account page

    Add:

    define('DEFAULT_COUNTRY', '38');

    to

    catalog/admin/includes/languages/english/core.php

    (Could you also add this to the bugtracker as a bug report?)

    Regards,
    pgmarshall
    _______________________________

  10. #10
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Post Re: Need help on new products page and admin/customers/create account page

    I can confirm PGM's solution.

    Not a bug - just requires an update to the wiki.
    Last edited by ridexbuilder; 02-20-2011 at 01:34 AM.
    Hosting plans with installation, configuration, contributions, support and maintenance.

Page 1 of 2 12 LastLast

Similar Threads

  1. blank page create account
    By bramvh in forum osCmax v2 Installation issues
    Replies: 7
    Last Post: 08-23-2010, 12:07 AM
  2. Fixing the create account page
    By a1net822 in forum osCmax v2 Customization/Mods
    Replies: 8
    Last Post: 05-27-2007, 08:52 PM
  3. Combined login and create account page
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 04-05-2007, 03:01 PM
  4. State list missing on Create Account Page
    By zTech in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 09-13-2004, 08:15 AM
  5. login or create account as the home page with hiden catalog
    By kamel in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 11-17-2003, 06: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
  •