

web-project
Members-
Content count
4,199 -
Joined
-
Last visited
-
Days Won
7
Everything posted by web-project
-
Hi all, I am still debugging the oscommerce 2.2 on PHP 5.2.5 and I found one more bug. All images which loaded through product_thumb.php are not show the images & shows only the following error message: the reason is: developer of oscommerce incorrectly coded the product_thumb.php, they left some part of code which should be used in normal php software. to fix error you will need to replace the product_thumb.php with the following code: <?php // "On the Fly Thumbnailer" using PHP GD Graphics Library by Nathan Welch (v1.5) // Scales product images dynamically, resulting in smaller file sizes, and keeps // proper image ratio. Used in conjunction with modified tep_image in html_output.php // // CONFIGURATION SETTINGS // // Use Resampling? Set the value below to true to generate resampled thumbnails // resulting in smoother-looking images. Not supported in GD ver. < 2.01 $use_resampling = true; // // Create True Color Thumbnails? Better quality overall but set to false if you // have GD version < 2.01 or if creating transparent thumbnails. $use_truecolor = true; // // Output GIFs as JPEGS? Set this option to true if you have GD version > 1.6 // and want to output GIF thumbnails as JPGs instead of GIFs or PNGs. Note that your // GIF transparencies will not be retained in the thumbnail if you output them // as JPGs. If you have GD Library < 1.6 with GIF create support, GIFs will // be output as GIFs. Set the "matte" color below if setting this option to true. $gif_as_jpeg = false; // // Define RGB Color Value for background matte color if outputting GIFs as JPEGs // Example: white is r=255, b=255, g=255; black is r=0, b=0, g=0; red is r=255, b=0, g=0; $r = 255; // Red color value (0-255) $g = 255; // Green color value (0-255) $b = 255; // Blue color value (0-255) // // Maintain aspect ration $maintain_aspect_ratio = true; // END CONFIGURATION SETTINGS // get and validate image path disabled for admin area $image_path = str_replace ( "../", "", $_GET['img'] ); $image_path = $_GET['img']; $new_width = $_GET['w']; $new_height = $_GET['h']; // Get the size of the image $image = @getimagesize($image_path); $orig_width = $image[0]; $orig_height = $image[1]; // Do not output if get values are larger than orig image if ($new_width > $orig_width || $new_height > $orig_height) { $new_width = $orig_width; $new_height = $orig_height; } else { //adjust width and height for aspect ratio if ($maintain_aspect_ratio) { //get lowest side if($orig_width>$orig_height){ // height is smaller so constrain width $new_width = $orig_width*$new_height/$orig_height; } else { // width is smaller or same $new_height = $orig_height*$new_width/$orig_width; } } // end if } // end if // Create appropriate image header if ($image[2] == 2 || ($image[2] == 1 && $gif_as_jpeg)) { header('Content-type: image/jpeg'); } elseif ($image[2] == 1 && function_exists("imagegif")) { header('Content-type: image/gif'); } elseif ($image[2] == 3 || $image[2] == 1) { header('Content-type: image/png'); } // Create a new, empty image based on settings if (function_exists("imagecreatetruecolor") && $use_truecolor) $tmp_img = imagecreatetruecolor($new_width,$new_height); else $tmp_img = imagecreate($new_width,$new_height); $th_bg_color = imagecolorallocate($tmp_img, $r, $g, $b); imagefill($tmp_img, 0, 0, $th_bg_color); imagecolortransparent($tmp_img, $th_bg_color); // Create the image to be scaled if ($image[2] == 2 && function_exists("imagecreatefromjpeg")) { $src = imagecreatefromjpeg($image_path); } elseif ($image[2] == 1 && function_exists("imagecreatefromgif")) { $src = imagecreatefromgif($image_path); } elseif (($image[2] == 3 || $image[2] == 1) && function_exists("imagecreatefrompng")) { $src = imagecreatefrompng($image_path); } // Scale the image based on settings if (function_exists("imagecopyresampled") && $use_resampling) imagecopyresampled($tmp_img, $src, 0, 0, 0, 0, $new_width, $new_height, $orig_width, $orig_height); else imagecopyresized($tmp_img, $src, 0, 0, 0, 0, $new_width, $new_height, $orig_width, $orig_height); // Output the image if ($image[2] == 2 || ($image[2] == 1 && $gif_as_jpeg)) { imagejpeg($tmp_img); } elseif ($image[2] == 1 && function_exists("imagegif")) { imagegif($tmp_img); } elseif ($image[2] == 3 || $image[2] == 1) { imagepng($tmp_img); } // Clear the image from memory imagedestroy($src); imagedestroy($tmp_img); ?> the following code has been modified: function_exists(imagegif) --> function_exists("imagegif") function_exists(imagecreatefrompng) --> function_exists("imagecreatefrompng") function_exists(imagecreatefromjpeg) --> function_exists("imagecreatefromjpeg") function_exists(imagecreatefromgif) --> function_exists("imagecreatefromgif") function_exists(imagecreatetruecolor) --> function_exists("imagecreatetruecolor") function_exists(imagecopyresampled) --> function_exists("imagecopyresampled")
-
Normally and legal way to avoid any suspension of account, the retailers include the transaction cost in price of products or services.
-
have you setup the PayPal shipping table? or the shipping calculates on your website?
-
Hi all, I have used the original LoginRadius module for osCommerce v2.3: http://addons.oscommerce.com/info/8306 Known issues: - after click on social netwok icon, I am getting the following error: Warning: Cannot modify header information - headers already sent by (output started at /catalogue/index.php:56) in /catalogue/includes/functions/general.php on line 33 - loging and create account page still under development (I can share code but the code is not function properly) the code for LoginRadius for osCommerce v2.2: sql need to load in to mysql database: insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Information Module', 'MODULE_BOXES_LOGINRADIUS_STATUS', 'True', 'Do you want to add the module to your shop?', '1', '510', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('LoginRadius API Key', 'MODULE_BOXES_LOGINRADIUS_API_KEY', '0', 'Paste LoginRadius API Key here', '1', '511', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('LoginRadius API Secret', 'MODULE_BOXES_LOGINRADIUS_API_SECRET_KEY', '0', 'Paste LoginRadius API Secret here', '1', '512', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Email Required', 'MODULE_BOXES_LOGINRADIUS_EMAIL_REQUIRED', 'True', 'Is Email Required?', '1', '513', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Title', 'MODULE_BOXES_LOGINRADIUS_TITLE', 'Social Login', 'Enter the Module Title of your choice', '1', '514', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Text on Login page', 'MODULE_BOXES_LOGINRADIUS_LOGINTEXT', 'You do not have to create a new account, login with your existing account using any of the following Providers:', 'Enter the text which you want to be appeared on Login page', '1', '515', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Text on Registration page', 'MODULE_BOXES_LOGINRADIUS_ACCTEXT', 'You do not have to create a new account, login with your existing account using any of the following Providers:', 'Enter the text which you want to be appeared on Registration page', '1', '516', now()); /catalogue/includes/boxes/bm_loginradius.php code <?php require(DIR_WS_CLASSES . 'loginradius.php'); global $cart,$navigation,$messageStack,$breadcrumb,$session_started,$customer_id,$customer_first_name,$customer_default_address_id,$customer_country_id,$customer_zone_id,$password,$confirm,$id,$provider,$profilename,$fullname,$email_address,$firstname,$lastname; define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('FILENAME_CREATE_ACCOUNT', 'create_account.php'); $language='english'; require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT); if ( $session_started == false ) { tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE)); } //for adding extra field function add_column_if_not_exist($db, $column, $column_attr = "varchar( 255 ) NULL" ) { $exists = false; $columns = mysql_query("show columns from $db"); while($c = mysql_fetch_assoc($columns)) { if($c['Field'] == $column){ $exists = true; break; } } if( !$exists ) { mysql_query("ALTER TABLE `$db` ADD `$column` $column_attr"); } } function popup($FirstName,$LastName,$id,$Provider,$ProfileName,$FullName,$msg) {?> <style type="text/css"> .LoginRadius_overlay { background: none no-repeat scroll 0 0 rgba(127, 127, 127, 0.6); position: absolute; top: 0; left: 0; z-index: 100001; width: 100%; height: 100%; overflow: auto; padding: 220px 20px 20px 20px; padding-bottom: 130px; position: fixed; } #popupouter{ -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; overflow:auto; background:#f3f3f3; padding:0px 0px 0px 0px; width:370px; margin:0 auto; } #popupinner{ -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; overflow:auto; background:#ffffff; margin:10px; padding:10px 8px 4px 8px; } #textmatter{ margin:10px 0px 10px 0px; font-family:Arial, Helvetica, sans-serif; color:#666666; font-size:14px; } .inputtxt{ font-family:Arial, Helvetica, sans-serif; color:#a8a8a8; font-size:11px; border:#e5e5e5 1px solid; width:280px; height:27px; margin:5px 0px 15px 0px; } .inputbutton{ border:#dcdcdc 1px solid; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; text-decoration:none; color:#6e6e6e; font-family:Arial, Helvetica, sans-serif; font-size:13px; cursor:pointer; background:#f3f3f3; padding:6px 7px 6px 8px; margin:0px 8px 0px 0px; } .inputbutton:hover{ border:#00ccff 1px solid; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; khtml-border-radius:2px; text-decoration:none; color:#000000; font-family:Arial, Helvetica, sans-serif; font-size:13px; cursor:pointer; padding:6px 7px 6px 8px; -moz-box-shadow: 0px 0px 4px #8a8a8a; -webkit-box-shadow: 0px 0px 4px #8a8a8a; box-shadow: 0px 0px 4px #8a8a8a; background:#f3f3f3; margin:0px 8px 0px 0px; } #textdiv{ text-align:right; font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#000000; } .span{ font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#00ccff; } .span1{ font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#333333; } .LoginRadius_container_outer { width: 648px; border: 1px solid #ccc; background-color: #EAF7FF; } .LoginRadius_container_inner { background-color: #EAF7FF; padding: 10px; margin-bottom: 10px; overflow: hidden; width: 140px; } .LoginRadius_container { float:left; padding: 10px; margin-bottom: 10px; overflow: hidden; width:460px; background-color: #EAF7FF; } .LoginRadius_container_outer h3 { color:#00ccff; font-size:1.1em; } .LoginRadius_container_outer ul { list-style-type: disc; padding-left: 20px; } .LoginRadius_container_outer .LoginRadius_container_links { border-color: #E6DB55; } .LoginRadius_container_outer .LoginRadius_container_links a { color: #111; text-decoration:none; } .LoginRadius_container_outer .LoginRadius_container_links a:hover { color: #00ccff; } .LoginRadius_table { background-color: #efefef; border: 1px solid #ccc; width: 650px; margin-bottom: 10px; } .LoginRadius_table input { border-color: #aaa; } .LoginRadius_table .head { font-weight: bold; font-size: 13px; font-weight: bold; background-color: #ddd; } .LoginRadius_table tr td.row { line-height: 36px; } .LoginRadius_table tr.description td { color: #0D5995; } .LoginRadius_table .row_white { background-color: #fff; } <!--[if IE]> .LoginRadius_content_IE { background:black; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=90)"; filter: alpha(opacity=90); } <![endif]--> </style> <div id="fade" class="LoginRadius_overlay" class="LoginRadius_content_IE"> <div id="popupouter"> <div id="popupinner"> <div id="textmatter"><?php if($msg){echo "<b>".$msg."</b>";}?></div> <form><div> <input type="text" name="email" id="email" class="inputtxt" /></div><div> <input type="submit" id="LoginRadiusRedSliderClick" name="LoginRadiusRedSliderClick" value="Submit" class="inputbutton"> <input type="submit" value="cancel" class="inputbutton" onClick="history.back()" /> <input type="hidden" name="firstname" value="<?php echo $FirstName;?>" /> <input type="hidden" name="lastname" value="<?php echo $LastName;?>" /> <input type="hidden" name="id" value="<?php echo $id;?>"/> <input type="hidden" name="provider" value="<?php echo $Provider;?>"/> <input type="hidden" name="profilename" value="<?php echo $ProfileName;?>"/> <input type="hidden" name="fullname" value="<?php echo $FullName;?>"/> </div></form><div id="textdiv">Poweredby <span class="span">Login</span><span class="span1">Radius</span></div> </div></div></div> <?php } function is_valid_email($email) { $result = TRUE; if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email)) { $result = FALSE; } return $result; } $db='customers'; $column='loginradiusid'; add_column_if_not_exist($db, $column, $column_attr = "varchar( 255 ) NULL" ); //until here $apikey_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_BOXES_LOGINRADIUS_API_KEY'"); $apikey_array = tep_db_fetch_array($apikey_query); $apikey = $apikey_array['configuration_value']; $apisecretkey_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_BOXES_LOGINRADIUS_API_SECRET_KEY'"); $apisecretkey_array = tep_db_fetch_array($apisecretkey_query); $apisecretkey = $apisecretkey_array['configuration_value']; $emailrequired_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_BOXES_LOGINRADIUS_EMAIL_REQUIRED'"); $emailrequired_array = tep_db_fetch_array($emailrequired_query); $emailrequired = $emailrequired_array['configuration_value']; //until here if(isset($_SERVER['HTTPS'])) { $loc = urlencode("https://".$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); } else { $loc=urlencode("http://".$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); } if(tep_session_is_registered('customer_id')) { $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_LOGINRADIUS_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . "Hello ". $customer_first_name .'!' . '</div>' . '</div>'; } else { if(isset($apikey)) { $obj_auth = new LoginRadiusAuth(); $UserAuth = $obj_auth->auth($apikey, $apisecretkey); $IsHttps=$UserAuth->IsHttps; if($IsHttps == 1) { $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_LOGINRADIUS_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents"><iframe src="https://hub.loginradius.com/Control/PluginSlider2.aspx?apikey='.$apikey.'&callback='.$loc.'" width="138" height="49" frameborder="0" scrolling="no"></iframe> </div></div>'; } else { $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_LOGINRADIUS_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents"><iframe src="http://hub.loginradius.com/Control/PluginSlider2.aspx?apikey='.$apikey.'&callback='.$loc.'" width="138" height="49" frameborder="0" scrolling="no"></iframe> </div></div>'; } } } $obj = new LoginRadius(); $userprofile = $obj->construct($apisecretkey); if( $obj->IsAuthenticated == true ) { $process = true; $id = $userprofile->ID; $Provider = $userprofile->Provider; $FirstName = $userprofile->FirstName; $LastName = $userprofile->LastName; $FullName = $userprofile->FullName; $ProfileName = $userprofile->ProfileName; $password = mt_rand(8, 15); $error = false; $Email = $userprofile->Email[0]->Value; if($Email == "" && $emailrequired == 'True') { $check_existId = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where loginradiusid = '" . mysql_real_escape_string($id) . "'"); $check_customer = tep_db_fetch_array($check_existId); if($check_customer > 0 && $check_customer != '') { $customer_id = $check_customer['customers_id']; $customer_default_address_id = $check_customer['customers_default_address_id']; $customer_first_name = $check_customer['customers_firstname']; tep_session_register('customer_id'); tep_session_register('customer_default_address_id'); tep_session_register('customer_first_name'); tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'"); $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); $cart->restore_contents(); $name = $FirstName . ' ' . $LastName; if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); tep_redirect($origin_href); } else { define('FILENAME_DEFAULT', 'index.php'); tep_redirect(tep_href_link(FILENAME_DEFAULT)); } } else { $msg = "Please enter email to proceed."; popup($FirstName,$LastName,$id,$Provider,$ProfileName,$FullName,$msg); } } } if($_GET['email']) { $check_existEmail = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . $_GET['email'] . "'"); $check_customer = tep_db_fetch_array($check_existEmail); if($check_customer > 0 || !is_valid_email($_GET['email'])) { $msg = "<p style='color:red;'><b>This email already registered or invalid. Please choose another one.</b></p>"; popup($FirstName,$LastName,$id,$Provider,$ProfileName,$FullName,$msg); } else { $FirstName = $_GET['firstname']; $LastName = $_GET['lastname']; $Email = $_GET['email']; $ProfileName = $_GET['profilename']; $Provider = $_GET['provider']; $id = $_GET['id']; $FullName = $_GET['fullname']; } } $Email_id=substr($id,7); $Email_id2=str_replace("/","_",$Email_id); switch( $Provider ){ case 'facebook': $FirstName = $FirstName; $LastName = $LastName; $Email = $Email; break; case 'twitter': $FirstName=$ProfileName; $LastName=$ProfileName; if ($emailrequired == 'True'){ $Email=$Email;} else{ $Email=$id.'@'.$Provider.'.com';} break; case 'google': $FirstName=$FirstName; $LastName=$LastName; $Email=$Email; break; case 'yahoo': $FirstName=$FirstName; $LastName=$LastName; $Email=$Email; break; case 'linkedin': $FirstName=$FirstName; $LastName=$LastName; if ($emailrequired == 'True'){ $Email=$Email;} else{ $Email = $id.'@'.$Provider.'.com';} break; case 'aol': $user_name=explode('@',$Email); $FirstName=$user_name[0]; $LastName=$user_name[0]; $Email=$Email; break; case 'hyves': $FirstName=$FullName; $LastName=$FullName; $Email=$Email; break; default: if($FirstName =='' && $LastName =='' && $FullName!='') { $FirstName = $FullName;} if($FirstName =='' && $LastName =='' && $FullName=='' && $ProfileName!='') {$FirstName =$ProfileName;} $Email_id=substr($id,7); $Email_id2=str_replace("/","_",$Email_id); if($FirstName =='' && $LastName =='' && $Email=='' && $id!='') { $username = $id; $FirstName = $id; $LastName = $id; if ($emailrequired == 'True'){ $Email=$Email;} else{ $Email = str_replace(".","_",$Email_id2).'@'.$Provider.'.com';} } else if($FirstName != '' && $LastName !='' && $Email == '' && $id!=''){ $FirstName =$FirstName; $LastName = $LastName; if ($emailrequired == 'True'){ $Email=$Email;} else{ $Email=str_replace(" ","_",$FirstName).'@'.$Provider.'.com';} } else if($FirstName =='' && $LastName =='' && $Email != ''){ $user_name = explode('@',$Email); $FirstName =str_replace("_"," ",$user_name[0]); $LastName=str_replace("_"," ",$user_name[0]); $Email = $Email; } else if($LastName=='' && $FirstName !='' && $Email != ''){ $FirstName = $FirstName; $LastName = $FirstName; $Email = $Email; } else { $FirstName = $FirstName; $LastName = $LastName; $Email = $Email; } break; } if( isset($id) && $Email !="") { $check_existId = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where loginradiusid = '" . mysql_real_escape_string($id) . "'"); $check_customer = tep_db_fetch_array($check_existId); if(!$check_customer && $check_customer == '') { $check_existEmail = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . $Email . "'"); $check_customer = tep_db_fetch_array($check_existEmail); } if($check_customer) { $customer_id = $check_customer['customers_id']; $customer_default_address_id = $check_customer['customers_default_address_id']; $customer_first_name = $check_customer['customers_firstname']; tep_session_register('customer_id'); tep_session_register('customer_default_address_id'); tep_session_register('customer_first_name'); tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'"); $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); $cart->restore_contents(); $name = $FirstName . ' ' . $LastName; if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); tep_redirect($origin_href); } else { define('FILENAME_DEFAULT', 'index.php'); tep_redirect(tep_href_link(FILENAME_DEFAULT)); } } else { define('FILENAME_COOKIE_USAGE', 'cookie_usage.php'); define('FILENAME_LOGIN', 'login.php'); define('FILENAME_ACCOUNT', 'account.php'); define('FILENAME_ACCOUNT_EDIT', 'account_edit.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_EDIT); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN); $sql_data_array = array('customers_firstname' => $FirstName, 'customers_lastname' => $LastName, 'customers_email_address' => $Email, 'loginradiusid' => mysql_real_escape_string($id), 'customers_password' => tep_encrypt_password($password)); tep_db_perform(TABLE_CUSTOMERS, $sql_data_array); $customer_id = tep_db_insert_id(); $sql_data_array = array('customers_id' => $customer_id, 'entry_firstname' => $FirstName, 'entry_lastname' => $LastName, 'entry_country_id' => '0'); tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array); $address_id = tep_db_insert_id(); tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'"); tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())"); if (SESSION_RECREATE == 'True') { tep_session_recreate(); } $customer_first_name = $FirstName; $customer_default_address_id = $address_id; $customer_country_id = '0'; tep_session_register('customer_id'); tep_session_register('customer_default_address_id'); tep_session_register('customer_first_name'); $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); $cart->restore_contents(); $name = $FirstName . ' ' . $LastName; $email_text = sprintf(EMAIL_GREET_NONE, $FirstName); $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING; tep_mail($name, $Email, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); define('FILENAME_CREATE_ACCOUNT_SUCCESS', 'create_account_success.php'); tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL')); } } if ($messageStack->size('create_account') > 0) { echo $messageStack->output('create_account'); } ?> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => MODULE_BOXES_LOGINRADIUS_BOX_TITLE); new infoBoxHeading($info_box_contents, $newtheme, false, false); $loginboxcontent = ""; $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => $data ); new infoBox($info_box_contents); ?> </td> </tr> /catalogue/includes/classes/loginradius.php code <?php class LoginRadius { public $IsAuthenticated, $JsonResponse, $UserProfile; public function construct($ApiSecrete) { $IsAuthenticated = false; if (isset($_REQUEST['token'])) { $ValidateUrl = "http://hub.loginradius.com/userprofile.ashx?token=".$_REQUEST['token']."&apisecrete=".$ApiSecrete.""; if (in_array('curl', get_loaded_extensions())) { $curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, $ValidateUrl); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 3); curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, true); if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off')) { curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true); $JsonResponse = curl_exec($curl_handle); } else { curl_setopt($curl_handle, CURLOPT_HEADER, 1); $url = curl_getinfo($curl_handle, CURLINFO_EFFECTIVE_URL); curl_close($curl_handle); $ch = curl_init(); $url = str_replace('?','/?',$url); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $JsonResponse = curl_exec($ch); curl_close($ch); } $UserProfile = json_decode($JsonResponse); } else if (ini_get('allow_url_fopen') == 1) { $JsonResponse = file_get_contents($ValidateUrl); $UserProfile = json_decode($JsonResponse); } else { echo "Please check php.ini settings<br><b>cURL support = enabled <br>or<br>allow_url_fopen = On</b>"; } if (isset($UserProfile->ID) && $UserProfile->ID != ''){ $this->IsAuthenticated = true; return $UserProfile; } } } } class LoginRadiusAuth { public $IsAuth, $JsonResponse, $UserAuth; public function auth($ApiKey, $ApiSecrete){ $IsAuth = false; if (isset($ApiKey)) { $ApiKey = trim($ApiKey); $ApiSecrete = trim($ApiSecrete); $ValidateUrl = "https://hub.loginradius.com/getappinfo/$ApiKey/$ApiSecrete"; if (in_array('curl', get_loaded_extensions())) { $curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, $ValidateUrl); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 3); curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, true); if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off')) { curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true); $JsonResponse = curl_exec($curl_handle); } else { curl_setopt($curl_handle, CURLOPT_HEADER, 1); $url = curl_getinfo($curl_handle, CURLINFO_EFFECTIVE_URL); curl_close($curl_handle); $ch = curl_init(); $url = str_replace('?','/?',$url); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $JsonResponse = curl_exec($ch); curl_close($ch); } $UserAuth = json_decode($JsonResponse); } else if (ini_get('allow_url_fopen') == 1) { $JsonResponse = file_get_contents($ValidateUrl); $UserAuth = json_decode($JsonResponse); } else { echo "Please check php.ini settings<br><b>cURL support = enabled <br>or<br>allow_url_fopen = On</b>"; } if (isset( $UserAuth->IsValid)){ $this->IsAuth = true; return $UserAuth; } } } } ?> /catalogue/includes/languages/english.php code add to the bottom of the file: define('MODULE_BOXES_LOGINRADIUS_TITLE', 'Social Login'); $title_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_BOXES_LOGINRADIUS_TITLE'"); $title_array = tep_db_fetch_array($title_query); $title = $title_array['configuration_value']; define('MODULE_BOXES_LOGINRADIUS_TITLE', $title); define('MODULE_BOXES_LOGINRADIUS_DESCRIPTION', 'Login with Existing Account'); define('MODULE_BOXES_LOGINRADIUS_BOX_TITLE', $title); I am interesting to find the help with known issues, see above.
- 6 replies
-
- loginradius
- oscommerce v2.2
-
(and 1 more)
Tagged with:
-
moving multiple products to another category
web-project replied to xvoyance's topic in General Add-Ons Support
google for it, first result: www.oscommerce.com/community/contributions,1401 -
Paypal doesn't charge client account (sandbox mode)
web-project replied to aldebaran12's topic in PayPal
you can create the sandbox PayPal client account and run the transaction using the sandbox seller and buyer PayPal account. -
modify the code.
-
Show Sold Out Items for osCommerce Online Merchant v2.3.1
web-project replied to saashosc's topic in General Add-Ons Support
modify the code to adjust to your version. -
PayPal Express Official Harald Error with htmlspecialchars general.php
web-project replied to campeom's topic in PayPal
for some reason, it's only you who have the issue with PayPal express, check your modification and correct the problem. -
Add Handling Fee Description to USPS Module
web-project replied to wraven's topic in Shipping Modules
do the search in contribution part of this website, the module is available. -
the module is available as commercial not open source
-
LoginRadius for osCommerce v2.2
web-project replied to web-project's topic in General Add-Ons Support
only the following line: <html <?php echo HTML_PARAMS; ?>> supposed to redirect to create_account_success.php file, instead it's opening the account after a click (as it should be) and refresh the index.php page. No.- 6 replies
-
- loginradius
- oscommerce v2.2
-
(and 1 more)
Tagged with:
-
Does anyone know how to setup Easy Call for Price 2.3.1
web-project replied to midiman2525's topic in General Add-Ons Support
can be done very easy way, example: if price for the product is set to 0.00 than the add to cart button is disabled and the "call for proce" instead of 0.00 will appear - very easy to setup. -
remove the zero from calculation and you will get the issue fixed.
-
<input type="hidden" name="frete" id="frete" value="<?php echo number_format($showOrder['frete_value'], 2, '.', ''); ?>" /> try: <input type="hidden" name="frete" id="frete" value="<?php echo number_format($order_total['ot_shipping'], 2, '.', ''); ?>" />
-
is any errors in the file? or on your hosting?
-
upload the file, as it's missing, check the URL yourself and you will see: ERROR: 404
-
Where to code payment gateway callback processing?
web-project replied to j_vovus's topic in Add-Ons Development
normally some payment gateways like PayPal send information back to store via IPN/API about the payment back to store. verify information and enter the info as order comments (PayPal and other modules do the same way) no you don't need as it's normally in the same public folder. -
have you setup the PayPal Express access using the API credentials from PayPal website? or just enetered email and password? as it's different type of access.
-
[Contribution] iOSC - mobile version of OSC on your iPhone
web-project replied to bumbarash's topic in General Add-Ons Support
the contribution is missing the checkout function, removed all the necessary functions of oscommerce, incorrectly set the filenames, completely mess -
Where can I find Article Manager download
web-project replied to Paul101`'s topic in General Add-Ons Support
normally need to unzip the zip file and read the installation manual how to install the module. -
you need to modify the paypal express to add additional code to enable support of handling fee
-
Comments of text free for every product in shopping cart
web-project replied to lluisllr's topic in General Add-Ons Support
normally the oscommerce show the option for comments, but not for every product, you will be able to install module which allow to put the text per product, with small modification you will be able to use it. -
Favorite WYSIWYG Editor for clients?
web-project replied to merry's topic in General Add-Ons Support
my favourite HTML editor is CKEditor- 3 replies
-
- html editor
- wysiwyg
-
(and 1 more)
Tagged with:
-
why: function cmp($a, $B ) { as it should be: function cmp($a, $b ) { you have the issue that the cmp() function is declared twice, as for the rest of code is fine, looking on example from the php.net and comparing to the following code: <?php function cmp($a, $b ) { if ($a == $b { return 0; } return ($a < $b ? -1 : 1; } $a = array(3, 2, 5, 6, 1); usort($a, "cmp"); foreach ($a as $key => $value) { echo "$key: $value\n"; } ?> http://php.net/manua...ction.usort.php