Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

plz...someone help me - buy_now and cookies


teixeira.pedro

Recommended Posts

Posted

hi!

 

sorry for my english, i'm from brazil.

 

in the page of category or index, the button buy_now redirect to the url: index.php/action/buy_now/products_id/277

 

but there is a problem

 

if the user already is in the web site, he has the cookie of id session and no problems to click in the buy_now button

 

but....if the user click in the link of buy_now in another site or in your e-mail...he dont have de cookie

 

this cookie is set in application_top.php

 

and the function buy now is in application_top.php too

 

that is the problem....to add the product to the cart, the user must have this cookie....but this cookie is set in the same page (application_top.php)

 

but the cookie not become visible in the same page...needs to reaload the page

 

whats happen?

 

the user is redirect do the COOKIE_USAGE page

 

i dont know what to do....i'm looking for the anser a long time

 

someone can helpme?

 

thanks

Posted

yes..but in this way it is not cool

 

the session id stay in the url....if the user pass the url for a friend...this friend can see everything for this user....it is not security

 

i need to fix this bug...it is only way....but how?

Posted
yes..but in this way it is not cool

 

the session id stay in the url....if the user pass the url for a friend...this friend can see everything for this user....it is not security

 

i need to fix this bug...it is only way....but how?

 

if you force cookies then a session is not started until cookies are verified so you cannot do that unless you override that in application top.

if you do not force cookies, the first page will have session id's in the url but they will not stay there if cookies are accepted.

Treasurer MFC

Posted

i do this modifications in aplication_top and works!

 

// Shopping cart actions

if (isset($HTTP_GET_VARS['action'])) {

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled

if ($session_started == false) {

 

if (!isset($HTTP_GET_VARS['cootest']))

{

$url = $_SERVER['REQUEST_URI'] . "/cootest";

tep_redirect(tep_href_link($url));

}else{

tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

}

 

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...