Jump to content

J.Silver

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

J.Silver's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Dear Sirs, I have an e-commerce program that is complete in all of its aspects but cannot pass the cart page—unable to Checkout to the next page. I am able to log into the site via either http or https protocols. In https, e.g., I can move through the index page, catalogue, browse, shopping, wish list, & cart pages. The cart page itself functions properly as designed in the sense of adding items, removing items to the wish list, deleting items, provision of correct product and shipping costs, and amending quantities. The only problem is when clicking the Checkout, it does not proceed to next page but rather gives error message. In IE it gives ‘Internet Explorer Cannot Display the Webpage.’ In Chrome, it does the same but the message is error 105, and in FF the error is server is not available. Working URLs: https://final.local/ , https://final.local/browse/coffee/Kona/3 , https://final.local/cart.php Not working URL (the URL which gives above error messages): https://www.final/local/checkout.php?session=9a31881e6c08e8277b133e22794a0042 Header, footer¸ and other includable files are included properly as per design. I have included both cart files, and would highly appreciate any suggestions/amendments to enable me Checkout from the cart page. Many thanks cart.html Note: begins with normal html view and table (not included here), which appears as designed. </table><br /><p align="center"><input type="submit" value="Amend Quantity" class="button" /></form></p><br /><p align="center"><a href="https://<?php echo BASE_URL; ?>checkout.php?session=<?php echo $uid; ?>" class="button">Checkout</a></p></div> Note: ends with the normal html view (not included here), which appears as designed. cart.php <?php require ('./includes/config.inc.php'); if (isset($_COOKIE['SESSION'])) { $uid = $_COOKIE['SESSION']; } else { $uid = md5(uniqid('biped',true)); } setcookie('SESSION', $uid, time()+(60*60*24*30)); $page_title = 'Your Shoppping Cart’; include ('./includes/header.html'); require (MYSQL); include ('./includes/product_functions.inc.php'); // If there's a SKU value in the URL, break it down into its parts: if (isset($_GET['sku'])) { list($sp_type, $pid) = parse_sku($_GET['sku']); } if (isset ($pid, $sp_type, $_GET['action']) && ($_GET['action'] == 'add') ) { // Add a new product to the cart: $r = mysqli_query($dbc, "CALL add_to_cart('$uid', '$sp_type', $pid, 1)"); } elseif (isset ($sp_type, $pid, $_GET['action']) && ($_GET['action'] == 'remove') ) { // Remove it from the cart. $r = mysqli_query($dbc, "CALL remove_from_cart('$uid', '$sp_type', $pid)"); } elseif (isset ($sp_type, $pid, $_GET['action'], $_GET['qty']) && ($_GET['action'] == 'move') ) { // Move it to the cart. // Determine the quantity: $qty = (filter_var($_GET['qty'], FILTER_VALIDATE_INT, array('min_range' => 1))) ? $_GET['qty'] : 1; // Add it to the cart: $r = mysqli_query($dbc, "CALL add_to_cart('$uid', '$sp_type', $pid, $qty)"); // Remove it from the wish list: $r = mysqli_query($dbc, "CALL remove_from_wish_list('$uid', '$sp_type', $pid)"); } elseif (isset($_POST['quantity'])) { // Update quantities in the cart. foreach ($_POST['quantity'] as $sku => $qty) { // Parse the SKU: list($sp_type, $pid) = parse_sku($sku); if (isset($sp_type, $pid)) { // Determine the quantity: $qty = (filter_var($qty, FILTER_VALIDATE_INT, array('min_range' => 0)) !== false) ? $qty : 1; // Update the quantity in the cart: $r = mysqli_query($dbc, "CALL update_cart('$uid', '$sp_type', $pid, $qty)"); } } // End of FOREACH loop. }// End of main IF. // Get the cart contents: $r = mysqli_query($dbc, "CALL get_shopping_cart_contents('$uid')"); if (mysqli_num_rows($r) > 0) { // Products to show! include ('./views/cart.html'); } else { // Empty cart! include ('./views/emptycart.html'); } include ('./includes/footer.html'); ?>
  2. I am writing an e-commerce website in multiple languages, including some eastern languages that have numerals in their languages different than the Arabic numerals used worldwide. To give an example: Arabic Numerals: 0 1 2 3,… Urdu Numerals: ٣ ٢ ١ ٠ In countries using such Urdu, Persian, etc. numbers PC keyboards are configured differently, some keyboards are configured to enter the Arabic numerals, while the majority of keyboards are configured to enter their native numbers. This invited a need to design my website so that credit card numbers, address and phone numbers can accept different forms of numerals. Since orders, users, … tables should have one form of numbers only, I am thinking of a script in which the user can enter credit card numbers, address and phone numbers in multiple form numbers and then all forms are translated in the tables to be in one form only, Arabic numerals. I would appreciate sharing any ideas, scripts, etc. to achieve this.
  3. I am looking for advancing my knowledge about PHP, MySQL, Stored Procedures, JS, HTML5, and CSS. I want to buy recent books about those technologies, therefore, I would highly appreciate any recommendations of recent best advanced books. A couple of lines of why you consider such recommended books to be the best buys would help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.