Results 1 to 3 of 3

Thread: Disable buy button in one language

  1. #1
    Join Date
    Nov 2009
    Posts
    5

    Default Disable buy button in one language

    Hi,

    We'll be using AspDotNetStoreFront to sell products to a number of euro countries but for the UK we can not as the products are sold through a network of dealers, so for the UK we need to disable the buy button.

    We've got the source code so I just need pointing in the right direction as where to start.

    Many Thanks

    Dave

  2. #2
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    It can be done without even modifying the source. Since you're not selling products to UK, all you have to do is to remove the UK country from Configuration -> Taxes -> Edit Countries, so it won't be listed in the country drop down list in the registration page. That way, no customers will be registering with UK address. If you'd really want to do it via the source, go to ShoppingCart.cs class and find the GetAddToCartForm() method, you can add a certain condition around line 9509 or somewhere from there.

  3. #3
    Join Date
    Nov 2009
    Posts
    5

    Thumbs up

    Many Thanks for the info.

    That's exactly what we wanted.
    For UK customers we are going to allow them to select their nearest dealer whilst on the product page instead of the buy buttons so the source code route is the best.

    Already modified the code to not show the buy buttons if the Customer.Current.LocaleSetting is set to en-GB.

    Many Thanks again !

    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •