Post by Zezoiaj » Thu Feb 11, 2021 9:19 pm

Hi guys , good morning ,evening .
first of all excuse me for my bad syntax , i am not a native speaker of English .
i have developed a landing page that have a product page , infos and under it i made a form for quick order to customers who came from ads to one product
everything is ok and in browser it work just fine , the issue appears when opening the landing page from a third party browser , ex snapcaht preview
the data are not saved in cookies for some reason ..
means , it redirect the customer to checkout/success without passing any infos of his data to my php controller for some reason
i looked up a lot of topics on cookies but i couldn't solve it
none of the data i saved after redirecting from the page www.site.com/ads/laning.html to www.site.com/checkout/success

but when i use it in my browser ( phone or desktop ) directly it work just fine
when first load the page i call the function of cart/add and i pass the product data , then on click on button i do

i use opencart 3.0.3.6

thanks a lot
Last edited by Zezoiaj on Sat Feb 13, 2021 12:42 pm, edited 1 time in total.

New member

Posts

Joined
Fri Apr 12, 2019 10:49 pm

Post by straightlight » Thu Feb 11, 2021 9:32 pm

You could create a new service request in the Commercial Support section of the forum to get this done as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by mikeinterserv » Thu Feb 11, 2021 11:24 pm

Zezoiaj wrote:
Thu Feb 11, 2021 9:19 pm
the issue appears when opening the landing page from a third party browser , ex snapcaht preview
the data are not saved in cookie

but when i use it in my browser ( phone or desktop ) directly it work just fine
when first load the page i call the function of cart/add and i pass the product data , then on click on button i do
It probably comes down to third party cookies, SameSite, CrossSite cookies, SSL etc etc etc.
Depends on your browser settings and how you implemet cookies.

Cross-site request forgery (CSRF) attacks rely on the fact that cookies are attached to any request to a given origin, no matter who initiates the request. For example, if you visit evil.example then it can trigger requests to your-blog.example, and your browser will happily attach the associated cookies. If your blog isn't careful with how it validates those requests then evil.example could trigger actions like deleting posts or adding their own content.

from
https://web.dev/samesite-cookies-explained/

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Zezoiaj » Fri Feb 12, 2021 1:54 am

mikeinterserv wrote:
Thu Feb 11, 2021 11:24 pm
Zezoiaj wrote:
Thu Feb 11, 2021 9:19 pm
the issue appears when opening the landing page from a third party browser , ex snapcaht preview
the data are not saved in cookie

but when i use it in my browser ( phone or desktop ) directly it work just fine
when first load the page i call the function of cart/add and i pass the product data , then on click on button i do
It probably comes down to third party cookies, SameSite, CrossSite cookies, SSL etc etc etc.
Depends on your browser settings and how you implemet cookies.

Cross-site request forgery (CSRF) attacks rely on the fact that cookies are attached to any request to a given origin, no matter who initiates the request. For example, if you visit evil.example then it can trigger requests to your-blog.example, and your browser will happily attach the associated cookies. If your blog isn't careful with how it validates those requests then evil.example could trigger actions like deleting posts or adding their own content.

from
https://web.dev/samesite-cookies-explained/
thank you very much for you kind reply , i understood that ..
is there any way to solve the issue without getting in risk ?
i tried to configure all of the data from the php controller but still there are the address and email needed and the cart i couldn't pass these whatever i did ..

New member

Posts

Joined
Fri Apr 12, 2019 10:49 pm

Post by mikeinterserv » Fri Feb 12, 2021 2:02 am

Zezoiaj wrote:
Thu Feb 11, 2021 9:19 pm
the issue appears when opening the landing page from a third party browser , ex snapcaht preview
the data are not saved in cookies for some reason ..
means , it redirect the customer to checkout/success without passing any infos of his data to my php controller
What data is it ?
is ANY data passed at all
Without seeing the code, how the cookies are being implemented, what required and where it is nearly impossible to know exactly from here.
The link I gave you should provide all of the info you need to work it out.
Without seeing a working example as well it would be all guesswork to be honest.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales
Who is online

Users browsing this forum: No registered users and 47 guests