OpenCart: 2Checout Logged users gets logged out on success page - opencart

I have 2checkout return customers to the URL
http://store.com/index.php?route=checkout/success. Which is correct? Anyway, 2checkout sent me to the homepage after successful payment and showing as a visitor with empty cart., when click on continue button showing logged in and same cart items in cart.and
opencart didn't record the order nor did i receive any order confirmation via email.(Required)
The customer received an order confirmation but product's option (if any) is not shown. Please help!!
Thanks in advance...

Related

External url in Django template

I got receipt url from stripe like:
"receipt_url": "https://pay.stripe.com/receipts/acct_1FpzDdEHHOJvKiFZ/ch_1IsB5REHHOJvKiFZGxagDBoQ/rcpt_JVBS4giqfp3YUoHcqzjQAwMHWq",. I added to template as:
<div class="status-message">{{ transID.receipt_email }}<br/>Find your Receipt here:</div>
When i click on the link i'm redirected to the same page.
view storing fields from stripe:
transID = stripe.PaymentIntent.retrieve(session.payment_intent)
context = {
'customer': customer,
'transID': transID,
}
Is there a way when clicking on the link to redirected to the stripe's receipt_url?
Many thanks.
Is it possible that the receipt_url is empty? That would likely cause the behaviour you're describing. Maybe try logging it to make sure it's actually present.

Digital Audio AWS Add To Cart Form Returns Empty Cart

when using AWS Add To Cart form to purchase digital audio, after continuing on Amazons "Add to Shopping Cart" page I am returned an empty shopping cart.
Example URL:
http://www.amazon.com/gp/aws/cart/add.html?AWSAccessKeyId=AKIAJ5D6U3YO5XIR6ZYQ&AssociateTag=scrip04b-20&ASIN.1=B01BZRALVO&Quantity.1=1
The digital album is visable on this page but when you click continue it returns an empty shopping cart. Is this a bug?
EDIT:
I've tried while being logged in and also while being logged out. I've checked my "MP3 Cart" after clicking continue and that is empty too.

Django-AllAuth ACCOUNT_CONFIRM_EMAIL_ON_GET confusion

I'm a little bit confused by the configuration variable ACCOUNT_CONFIRM_EMAIL_ON_GET. (docs)
If a user clicks on an activation link in an email, wouldn't the request have to be a get request? (Surely I'm wrong or missing something).
From my testing, if I leave ACCOUNT_CONFIRM_EMAIL_ON_GET set to False, when I click on the activation link from my email my account does not get activated. What am I missing here?
When a user is registered an url to confirm the e-mail address is generated. Eg:
http://www.example.com/accounts/confirm-email/iq4ma0qw6fqazui7ilwd4b3vftg/
With ACCOUNT_CONFIRM_EMAIL_ON_GET set to True the user will confirm the e-mail just by clicking the link. This happens because by clicking on the link, he will request the url (GET) and therefore, allauth will mark the e-mail address as confirmed because a GET for this url was received.
With ACCOUNT_CONFIRM_EMAIL_ON_GET set to False, when the user clicks on the link, a page will be loaded where there will be a button "Confirm e-mail address" or something like this. Then the user has to click on that button that will generate a POST request that will confirm the e-mail. This happens because allauth will mark the e-mail address as confirmed only on POST and not on GET requests to the e-mail confirmation url.
If you take a look at the source, you can see that the arguments passed to the view from the URL will be redirected to the post() method, meaning the user will not see a confirmation screen.
https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L213

Get text box value in next page in Sitecore 7.2 with Web Form for Marketer

I created one Feedback form in Sitecore 7.2 by Web form for marketer(2.4) .
After submitting the form ,instead of displaying success message on same page I am redirecting user to "Thank-you" page. I want to display thank you message with "Email ID" that used to fill the form.
How i can get last page value in sitecore.
There is a good post by Mike Reynolds on Show Submitted Web Forms for Marketers Form Field Values on a Confirmation Page in Sitecore. http://sitecorejunkie.com/2014/06/14/show-submitted-web-forms-for-marketers-form-field-values-on-a-confirmation-page-in-sitecore/
Unfortunately you do not modified the Success Page pipeline but rather create a custom Save Action instead.

How to redirect to page which has GET parameters after login using the {{next}} variable in django

I am using allauth to provide registration and login in my django site. Everything else seems to be working fine other than that I am having problems to redirect the person to the current page after login.
I have a page where I have some interview questions and a typical url for it would be like
/questions/?company=google
This page contains a list of questions for the company google, but to view the answer the person needs to login. The answers are displayed in a dropdown box. However when the user clicks on login a request is sent to the login page as follows
/login/?next=/questions/
And the get parameter which was actually there in my actual page is not sent because of the & in my url. How can I solve this problem. It does not look nice that the person is redirected to a different page from where he/she tried to login.
I know sending the next parameter as a GET variable is not the solution, but is there a way I can send the redirect link as a POST variable from the template.
I tried another thing, in my view that displays the questions list. I set session variables which contains the url of the current link . If a user clicks on login, in my login view I check for this particular session variable. If it is set then I redirect to that page.
However the session variable is not received in the login view, I am not sure but I think the session is reset when the user goes to the login view.
Any suggestions are appreciated.
Have you tried
next = request.get_full_path()
This will return correct path with all queries ( see docs ) , you can then pass it as GET param to redirect url e.g.
full_path = request.get_full_path()
return HttpResponseRedirect('%s?next=%s' % (reverse('login'), full_path))
You should encode the URL-parameter in this case. You want to send a variable like /questions/?company=google, but as you mentioned the ?, = (amongst others) characters are special ones. It has a special meaning when embedded in the URL. If you encode the variable with URL encoding, it becomes %2Fquestions%2F%3Fcompany%3Dgoogle. If you assign that to the parameter next, the URL becomes: /login/?next=%2Fquestions%2F%3Fcompany%3Dgoogle. This should redirect to the correct place on login.