Results 1 to 10 of 22

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Location
    Chepstow, SE Wales
    Posts
    101
    Plugin Contributions
    0

    Default Re: Where is the page that controls country drop down

    Wicked thanks DR.

    Thats the easy bit i suppose, now im going to try and restrict what it pulls out.



    Cheers

    Lee
    Are we there yet?

    Just one more line of code and im done...

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Where is the page that controls country drop down

    Remember, that same function is used for creating new accounts as well.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2007
    Location
    Chepstow, SE Wales
    Posts
    101
    Plugin Contributions
    0

    Default Re: Where is the page that controls country drop down

    Oh damn!

    Umm, although I want to restrict the shipping address. I dont want to actually restrict the billing address.

    So a new customer coming in will not be able to register without being restricted country wise, is that right?

    Lee
    Are we there yet?

    Just one more line of code and im done...

  4. #4
    Join Date
    Sep 2007
    Location
    Chepstow, SE Wales
    Posts
    101
    Plugin Contributions
    0

    Default Re: Where is the page that controls country drop down

    Hi,

    I just opened up a new dummy account, and it seems fine, up until I try to change the billing address, and thats where it pull sout the same function.

    mmmm
    Are we there yet?

    Just one more line of code and im done...

  5. #5
    Join Date
    Sep 2007
    Location
    Chepstow, SE Wales
    Posts
    101
    Plugin Contributions
    0

    Default Re: Where is the page that controls country drop down

    Just noticed a possible work around though.

    The value of the variable '?main_page' changes from checkout_shipping_address to checkout_payment_address, so could try and make an if statement looking at this.

    What you think?
    Are we there yet?

    Just one more line of code and im done...

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Where is the page that controls country drop down

    Yes, you'll have to customize the function based on something relevant to your needs.
    If it's page-specific, you can global the $current_page_base variable and use that, or you could write a different function to produce the desired list, and call that function conditional on your criteria.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Sep 2007
    Location
    Chepstow, SE Wales
    Posts
    101
    Plugin Contributions
    0

    Default Re: Where is the page that controls country drop down

    Ok the if statement is working, as its not creating an y errors

    Code:
    <?php if ($main_page == checkout_shipping_address) { ?>
    <label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
    <?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" ' . ($flag_show_pulldown_states == true ? 'onchange="update_zone(this.form);"' : '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="alert">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?>
    <?php
    }
    ?>
    The if statement doesnt seem to recognise $main_page though, so if I can remember, do I reference the variable like this for example in the page:

    Code:
    $main_page = ;
    Are we there yet?

    Just one more line of code and im done...

  8. #8
    Join Date
    Sep 2007
    Location
    Chepstow, SE Wales
    Posts
    101
    Plugin Contributions
    0

    Default Re: Where is the page that controls country drop down

    Sorry to keep posting, but im getting excited now.

    I put this at the top of that page, and it worked, so all i got to try and get it to do now, is to read that variable '$main_page', without having to push the value in like below:

    Code:
    $main_page="checkout_shipping_address";
    Lee
    Are we there yet?

    Just one more line of code and im done...

 

 

Similar Threads

  1. where is the SQL that controls what the categories side box outputs?
    By edwinx in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 20 Mar 2011, 05:50 AM
  2. Replies: 7
    Last Post: 4 Mar 2010, 03:14 AM
  3. change the 'Sort By' drop down menu that appears at the top of the product list page?
    By autoace in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 26 Sep 2009, 03:41 AM
  4. how to make country drop down in shopping cart page read only???
    By lastpirate007 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 13 Dec 2007, 03:03 PM
  5. Which one is the class or id that controls the categories listing on top of page
    By qm360 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 9 Jul 2007, 02:35 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