VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Questions VM 1.1 ( the only active board for the old version) => Topic started by: wiseman11 on September 26, 2009, 01:40:43 am

Title: $product_url from flypage
Post by: wiseman11 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 :)
Title: Re: $product_url from flypage
Post by: MikeUK on September 26, 2009, 16:52:50 pm
Product url is the page you are on if you are on the flypage.
Title: Re: $product_url from flypage
Post by: wiseman11 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?
Title: Re: $product_url from flypage
Post by: MikeUK 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.
Title: Re: $product_url from flypage
Post by: wiseman11 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.
Title: Re: $product_url from flypage
Post by: wiseman11 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
Title: Re: $product_url from flypage
Post by: MikeUK 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.



Title: Re: $product_url from flypage
Post by: wiseman11 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.
Title: Re: $product_url from flypage
Post by: MikeUK 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.