Vae eCommerce Redirects
  • So Vae has some great little built-in redirects when you're using the checkout tag like:

    <v:store:checkout redirect="thanks" register_page="register" shop_page="index">

    I'm wondering if there is a way to force the checkout tag to keep the paths relative (like above), as opposed to redirect="/thanks". I have a unique setup where we have a couple of micro-ecommerce store-fronts setup in unique directories (all in the same Vae site). I would like to ensure that the checkout redirects remain inside those directories. As it appears now, they always look for a root file with those names.

    For example, if I had a URL like http://mysite.com/directory1/checkout, I want the redirect to keep me inside directory1, but as it appears, they always force me to a root file like http://mysite.com/thanks instead of http://mysite.com/directory1/thanks

    Any way to handle this?

  • 2 Answers sorted by
  • You could use some PHP:


    redirect="/<?=dirname($_SERVER['REQUEST_URI'])?>/thanks"

  • This worked great (I removed the preceding slash). Thanks Kevin.

    redirect="<?=dirname($_SERVER['REQUEST_URI'])?>/thanks"

    Also - in case anyone else ever reads this - you could just hard-code the directory paths into your files, but I was looking for something a little more dynamic since I have more directories to duplicate later.

    redirect="/directory1/thanks"

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion