Magento redirect to product page after add to wishlist for user who is not logged in - magento

Scenario:
When user is not logged in
What i want:
- When User click on wishlist
- Magento Redirect to Login Page
- After Successful login user need to redirect to recently used page i.e product page
What is happening:
- User redirected to dashboard after login

Your question is not clear.
But try this if you are searching for it.
You can change the setting in admin
System->Configuration->Customer->Customer Configuration->Login option
Change the setting Redirect Customer to Account Dashboard after Logging in to No.
There are also free extension available.
Thanks,

Your Question is clear and here is your Answer.
You can override the add to wishlist action in the wishlist controller and make it redirect to the referrer.
Override this method Mage_Wishlist_IndexController::addAction() and replace this:
$this->_redirect('*', array('wishlist_id' => $wishlist->getId()));
with this:
$this->_redirectReferer()

Related

Wicket Submit BehaviorListener after RestartResponseExeption and Session replacement

I have a AjaxFallbackLink to add a product into the wishlist of a customer. When a guest clicks the Link he is redirected to the login page with a RestartResponseAtInterceptPage. After successful login he returned to the first Page. But the URL contains the IBehaviorListener of my "add to wishlist" Link and every Ajax Link does nothing except to reload the page with no changes. I think the problem is the incorrect match of Page instance and BehaviorListener instance because my Page started with instance 1 and returned with instance 4 from Login Page. Everything works when the guest is already logged in.
How can i remove the illegal URL parameter or call the right Link callback to add the product to wishlist after successful login?
I think you need to do the following, in YourApplication#init() add:
getPageSettings().setCallListenerInterfaceAfterExpiry(true)
You can override it per Page if you don't want to enable it globally, see org.apache.wicket.Component#canCallListenerInterfaceAfterExpiry()

how to get the admin login page by inserting /ci-admin like /wp-admin in wordpress

I am wondering if that is possible to view the admin login page just by typing /CI_ADMIN after the domain name just like we do in wordpress.
http://www.abc.com/wp-admin
and I want to do
http://www.abc.com/ci-admin
for my codeigniter website. is that possible ? the url thing
you can do this with routes just define route in you routes.php file
$route['ci-admin'] = 'ci_admin/login';
for more how to create admin panel please read this article specially third method
CI Admin panel

magento admin url redirect to home page automatically

I faced a strang problem: When I want to login admin page, but it automatically redirect to home page.
our shop url is www.bestinnature.ca, the admin page is www.bestinnature.ca/index.php/admin.
could some give me some advice?
Play with site.com/magento/custom_admin_name to site.com/magento/index.php/custom_admin_name
You need to make changes in the core_config_data table in your database.
Regards
Vikk

DO NOT redirect just render the login layout

From my clients, they wanna all customers (users) SHOULD login before visiting any page on Magento site.
I know that if I do that, I have to check if a user does not login, we will redirect to
customer/account/login
I have question is:
I don't wanna redirect, I just wanna render login layout.(1)
So, how can I do that?
(1): I see in admin side, it has this behavior, when I try to visit any page of admin side. If the user did not login, or out session, it will render login layout, without redirect.
If I understood you right, you need add next code to your controller action:
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
$this->_forward('login', 'account', 'customer');
}
Get the login page layout description, build a block, and render as HTML.

Access virtuemart cart and shop for registered user only

Can i restrict the access permission for virtuemart cart and shop. It is my client requirement to show add to cart and user cart only for registered user and whenever any visitor try to get cart it will be redirected on login page.
have any possibility in virtuemart to fix access permission for non register user OR I should to change shop module code to restrict the access.
Need your suggestion very fast...
Thanks
As far as the cart is concerned, if you have it in a module then you simply need to set the access level to registered. For the cart flypage, you will need to set up a menu item for that page and set the access level to registered. The menu item can be in a hidden menu, it does not have to be displayed anywhere for this to work. As far as the add to cart button, You just need to make a modification to the theme, look for addtocart_form.tpl.php. You can put a simple conditional statement that displays a message if the user is not logged in. Here is a good example of using the user object in Joomla -
http://docs.joomla.org/Accessing_the_current_user_object
You could easily copy the example on this page for the add to cart form.

Resources