Jump to content
Larry Ullman's Book Forums

olaoyesunday

Members
  • Posts

    47
  • Joined

  • Last visited

Posts posted by olaoyesunday

  1. Thank you Bill.

     My problem is on how to insert into two tables simultaneously, I tried inserting into orders table after the line 100 in the registration.php which read $uid = mysqli_insert(dbc,q);

    $_SESSION['reg_user_id'] = $uid; but it is not working.

    You know what I need to know is how to insert into multiple table simultaneously. i.e users and orders table upon knowing the user_id

  2. Dear Admin,

    In chapter 6

    The payment gateway that I am using want me to insert transaction id, amount , payment status to my order table before sending it to their payment gateway and on my thanks php they want me to compare the transaction_id returned from their site with the one in my database before the receipt is shown or printed.

    please, where do I place the code : INSERT INTO orders (user_id, transaction_id, payment_status, payment_amount)  in my registration script before sending captured information to the payment processor?

  3. Dear Admin,

     I'm integrating a payment processor named Global pay by Zenith bank Nigeria on my site. The site is subscription site similar to Knowledge is power. My script is the same as registration.php in chapter 6 the only difference is where I change paypal code for global pay. I want to ask 2 questions :

    1) How can I generate transaction_id on my site for payment processor from my code? I thought paypal generated it for us behind the scene but here they want my site to generate it for the payment processor.

     

    2) How do I include receipt.php  for customer to print after completing the order on paypal without relying on the one paypal will send to the customer like we did in chapter 13?

     

     

     

     

  4. In chapter 12 page 404 sidebar Titled "Adding USER INFROMATION TO PDFS"

     in paragraph 2 the Author said, When the user views a pdf, we could write her emails and Names on top and bottom of each page.

     please, can you send me the script to implement  this. or any excellent tutorial that cover it on internet  I'm really interested. Like this particular e-book I'm using the name is written at the bottom of every page and when buying the e-book they will ask you to wait for say Ten minutes then they would send you a link to download the e-book in pdf and epub  and so on.

     

  5. Dear Larry,

     Merry Christmas and happy new year in advance!.

     

    I don't have ssl certificate now but how do I change the HTTPS in my mode rewrite to HTTP

     

    # For HTTPS pages:
    RewriteCond %{HTTPS} off
    RewriteRule ^(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L]

    to HTTP.

    anytime I tried to change <a href="https://' . BASE_URL . 'checkout.php" in cart.html to <a href="http://' . BASE_URL . 'checkout.php" it would remove my checkout.php from the subfolder to the root directory

     

    here is my full mode re-write

     

    <IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine on
    RewriteBase /effortless_ecommerce_2nd/ecomm2/html/
    # For the primary categories:
    RewriteRule ^shop/(coffee|goodies)/?$ shop.php?type=$1

    # For sales:
    RewriteRule ^shop/sales/?$ /sales.php

    # For specific products:
    RewriteRule ^browse/(coffee|goodies)/([A-Za-z\+\-]+)/([0-9]+)/?$ browse.php?type=$1&category=$2&id=$3

    # For HTTPS pages:
    RewriteCond %{HTTPS} off
    RewriteRule ^(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L]

    </IfModule>

  6. Larry,
    on page 53 and 54 of the book the mysql query you wrote orders, users tables do not execute :
    The one for users table normally complain that #1293 – Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause in line 11.
    2) For oders table I usually gets : #1005 – Can’t create table ‘ecommerce1.orders’ (errno: 150) (Details…).

    I tried using the sql I downloaded with the book but  get what i described . please, let some one help me.

     

×
×
  • Create New...