Author Topic: $product_url from flypage  (Read 3935 times)

wiseman11

  • Beginner
  • *
  • Posts: 27
$product_url from flypage
« on: September 26, 2009, 01:40:43 am »
The developer's guide (http://virtuemart.net/documentation/Developer_Manual/Modifying_the_Layout.html) states that the flypage should have access to the url: $product_url, but in my virtuemart, this variable is empty. Strangely, $next_product_url and $previous_product_url work, but I need $product_url to continue development. If there's some way of accessing the product ID without using the $product_url, that would be fine as well.

And if anyone knows how to access user information from the flypage, that'd be icing on the cake :)

MikeUK

  • Global Moderator
  • Full Member
  • *
  • Posts: 1344
Re: $product_url from flypage
« Reply #1 on: September 26, 2009, 16:52:50 pm »
Product url is the page you are on if you are on the flypage.
Get answers faster:

I can build your online shop, setup or customize Virtuemart or help your existing shop maximize its potential. Email / PM for info

wiseman11

  • Beginner
  • *
  • Posts: 27
Re: $product_url from flypage
« Reply #2 on: September 27, 2009, 00:22:14 am »
Riight, but when I do a <?php echo $product_url?>, nothing outputs. When i do <?php echo $next_product_url?> something outputs. Why does the variable $product_url contain nothing? Is this a common problem?

MikeUK

  • Global Moderator
  • Full Member
  • *
  • Posts: 1344
Re: $product_url from flypage
« Reply #3 on: September 27, 2009, 01:05:06 am »
Why would this be a common problem? It is pretty unusual to want to have a link to the page you are on.

Are you sure you understood my post before? Just don't know why you would want to do this.
Get answers faster:

I can build your online shop, setup or customize Virtuemart or help your existing shop maximize its potential. Email / PM for info

wiseman11

  • Beginner
  • *
  • Posts: 27
Re: $product_url from flypage
« Reply #4 on: September 27, 2009, 01:36:03 am »
Yes, I know exactly what it's supposed to do. What I want to do is parse the address of the current $product_url address to get the current product id, because I want to pass this information to an intermediary page where some attributes will be selected, and then the add to cart page (essentially I need to have more than one product_details page).

It sounds like I'm the first to need this, but it doesn't matter if it's needed or not, if it's in the documentation it should work the way the documentation says it works.

wiseman11

  • Beginner
  • *
  • Posts: 27
Re: $product_url from flypage
« Reply #5 on: September 27, 2009, 01:52:18 am »
To be more specific, I'm taking the url for the current product, and changing the portion of the url concerning the flypage (flypage=flypage.tpl&amp) to point to a second flypage. Currently I've done it using $next_product_url, but since the product_id is different in this, it doesn't really work as a solution

MikeUK

  • Global Moderator
  • Full Member
  • *
  • Posts: 1344
Re: $product_url from flypage
« Reply #6 on: September 27, 2009, 09:17:16 am »
This would have been simpler if your last post had been your first. If the product id (or product_url) is not available in the flypage, you will need to add it to the list of variables sent from shop.product_details.php. Then you can just rebuild the url link, wth the flypage you need. Or do all that in shop.product_details.



Get answers faster:

I can build your online shop, setup or customize Virtuemart or help your existing shop maximize its potential. Email / PM for info

wiseman11

  • Beginner
  • *
  • Posts: 27
Re: $product_url from flypage
« Reply #7 on: September 27, 2009, 21:52:46 pm »
I see, no way around it then, thanks. I'd suggest updating the documentation so that it reflects this isn't available, it creates great frustration when a product doesn't do what its documents tells you it does.

MikeUK

  • Global Moderator
  • Full Member
  • *
  • Posts: 1344
Re: $product_url from flypage
« Reply #8 on: September 27, 2009, 21:57:38 pm »
I see, no way around it then, thanks. I'd suggest updating the documentation so that it reflects this isn't available, it creates great frustration when a product doesn't do what its documents tells you it does.

Well, that is just the way I see it. I haven't tried this myself. Regarding the documentation, any updates would be very welcome if you see a specific area of improvement. This project has a limited number of people and any help with documentation would be great.
Get answers faster:

I can build your online shop, setup or customize Virtuemart or help your existing shop maximize its potential. Email / PM for info