Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Disable buy button in one language

  1. #1
    RBP is offline Junior Member
    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
    ASPAlfred is offline Senior Member
    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
    RBP is offline Junior Member
    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