Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Redirecting Users to Correct Shop

  • 27-11-2006 10:15am
    #1
    Registered Users, Registered Users 2 Posts: 11,987 ✭✭✭✭


    A friend of mine has a shop site.

    Oringally there was only 1 shop, now there are 2, one for .ie, one for .co.uk

    As a solution, he has coded the products page to check if the shop selection page has been viewed, if not then it redirects to the shop selection page.

    The problem is, if I wanted to directly link to a product. e.g shop/products.php?item=product1 the products.php will check if the shop/shop_selection.php page has been viewed, if not the user has the choice of the UK or IE shop, which just links through to the shop home page. (shop/index.php)

    I'd like to deep link to the products, allow the user to choose their shop, and redirect them to the page they initially were looking for.

    Anyone know what kind of query that requires.

    Can I store the original query string as a variable to the shop selection page, and re-use it as the hyperlink for their selection

    $_SERVER["QUERY_STRING"] off the products.php page to store the "item=product1" and re-use that as the link

    Sorry if that sounds overly confusing, but I'm working with what I have here.


Comments

  • Registered Users, Registered Users 2 Posts: 568 ✭✭✭phil


    Try rewriting / rewording that.

    Phil


  • Registered Users, Registered Users 2 Posts: 2,170 ✭✭✭Serbian


    You may want to implement something similar to what ESPN.com does when you link directly to one of their stories:

    http://soccernet.espn.go.com/section?id=england&cc=5739

    That should present you with a page asking you to select your region, then it should link to the English Premiership section of the site. If you look at the page URL, the section that was linked to is stored as a variable. You could have a page: selectShop.php?product=1234, which redirects to product 1234 once the user has made his selection.


  • Registered Users, Registered Users 2 Posts: 11,987 ✭✭✭✭zAbbo


    Yes, I'm looking to do something like that, pass the referring url to the shop selection page.

    I'll have a go with some of the code and see what happens :)


Advertisement