wishlist - login - redirect - it goes wrong?

Author Message

Fabricio Guerrero

Monday 05 March 2007 8:58:58 am

Hi,

I've come accross an issue with eZ wishlist + login + redirect that i can't find an easy fix for...

Currently if you want to use the wishlist you need to be logged on and if your not a form comes up and asks you to do so... which is cool but the issue is that after you logon it redirects you back to the page you came from which is usually the product page and not the complete wishlist. which is not much help. :(

The issue is that if you add:

<input type="text" name="RedirectURI" value="wishlist" />

into the login form it properly redirects but it does NOT add the product into the wishlist... seems as if it redirects right after loggin in and not going through the wishlist adding products code.. in other words it redirects too soon.. it should wait til after product is added.

If I try to do: <input type="text" name="RedirectURIAfterPublish" value="wishlist" />

nothing happens as it makes sense since I've read this only works when form action is set to "content/edit" and not for a login form.

I can only think of hacking the kernel a bit in order to make RedirectURIAfterPublish work with login or so...

maybe do something like: http://ez.no/ezpublish/documentation/customization/tips_tricks/redirecting_after_content_publishing

has any one got any good pointers??? come accross to a similar situation??

thanks,
Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

Claudia Kosny

Monday 05 March 2007 2:34:20 pm

Hi Fabricio

That's looks quite tricky. The problem is that the wishlist needs the posted ContentObjectID and ezOption to add the product to the wishlist. And if you are redirected to the login page, the post data is lost.

A possible approach might be to hack the wishlist.php so it works with sessions as well and put the posted data in the session before the wishlist redirects to the login page.

Since you have already managed to get redirected back to the wishlist after login, the wishlist should then check for session variables, add the product and remove the session variables.

Maybe you should also just add the redirection to the wishlist if one of these session variables is set - after all you don't want to redirect to the wishlist every time someone logs in.

Claudia

Fabricio Guerrero

Tuesday 06 March 2007 12:28:54 am

Hi Claudia,

Thanks for this... it confirms what I suspected... i have to hack the kernel a bit to get this working...

I'll post the results here soon.

Thanks again.
Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:30:32
Script start
Timing: Jan 18 2025 18:30:32
Module start 'layout'
Timing: Jan 18 2025 18:30:32
Module start 'content'
Timing: Jan 18 2025 18:30:32
Module end 'content'
Timing: Jan 18 2025 18:30:32
Script end

Main resources:

Total runtime0.0161 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.0156152.6250
Module start 'layout' 0.00510.0036 740.640639.4453
Module start 'content' 0.00870.0050 780.085993.3672
Module end 'content' 0.01370.0024 873.453134.3047
Script end 0.0161  907.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002615.9429140.0002
Check MTime0.00116.9824140.0001
Mysql Total
Database connection0.00074.043510.0007
Mysqli_queries0.002817.176230.0009
Looping result0.00000.124410.0000
Template Total0.002012.410.0020
Template load0.00116.998710.0011
Template processing0.00095.346410.0009
Override
Cache load0.00063.862810.0006
General
dbfile0.00031.883380.0000
String conversion0.00000.048940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs