Hi, I am writing an SC extension and I am facing a...
# suitecommerce
s
Hi, I am writing an SC extension and I am facing an issue while redirecting from Login/Register page to another page (in Checkout application). I registered a page/route in checkout application, "My Items List" page and the idea is that the users will visit this page (they don't need to be logged in) from Login/Register page. But the issue is when I click on a button to redirect user to "My Items List" page, I am redirected (from Login/Register page) to this page but only for a short while. And after that I am redirected back to Login/Register page. Any idea what I need to do to resolve this issue? Thank you
s
Could you elaborate? Is the page inside in the myaccount application or the shopping application?
Because there are no pages within the myaccount application that can be accessed without logging in first
s
it is inside the checkout application similar to login page.
s
OK ditto, you cannot access the checkout application without logging in
So, that's the first hurdle – either host it in the shopping application or require users to log in first.
👍 1
s
Actually, it will work like another login page and I require extending the LoginRegister module.
specifically I require "LoginRegister.Login.View"
s
Well I don't have any advice for creating a second log in page, there's generally no good reason to do that. It would be better to make your changes to the existing one. Why do you think you need a separate login page?
👍 1
s
Yes. Maybe using a modal on Login page instead will do the job. Just wanted to display a list of some records on page before the user logs in. Many Thanks.
a
If it's "My Items", does that mean Items that the user has purchased before? If that's the case, then how will the system know who it is whose items it is showing in the My Items list? Or is it more of a preview window of items they could purchase once they log in?
s
Yeah, discussing functionality: I am also a little puzzled about what it is you want to achieve. SuiteCommerce already includes functionality for generating a list of items that the user has recently ordered, as well as the ability to save them to lists. Recreating this functionality independently, rather than just augmenting what we already have, seems a little strange to me.
s
Apologies for not clearly explaining what I truly wanted to achieve here. I went a bit in wrong direction, in terms of solution. Previously, I wanted to just explore how to redirect from Login/Register page to another page if a user with specific email tries to login and on the new page they will be shown a list of records. And how to utilize components on Login/Register page on my new page. But actually the goal was to allow user with specific email (sales rep) to be shown a list of associated customers and upon selection of a customer, a Login form will appear.