Jump to content

melprok

Member
  • Posts

    8
  • Joined

  • Last visited

Posts posted by melprok

  1. The issue is that I have a input type = file button.

    If the I want to add a record to the table with the path of the selected image, I have no problem.

     

    The problem is when I want to update that record. I see the image very well in the page when I search for that record. But when I press submit to update the record I have no data in the input type file, because I don't select any image. The image is already display in the page.

     

    In the input type file says "No file choosen".

     

    I pass the image selected in the input type file, to php to update. But in this cases the input type file is not set.

     

    I can assign a value to the input type file?

     

    This is my test page. http://mkws.melprokwebsolutions.com/php/htmlformentry.php

     

    If you search product #2, you will see an image. But when I press submit, I have no file to pass to the php page.

     

     

    Thanks...

  2. Ok, this is the addtocart.php file. You mean redirect to the cart page from this page?

     

     

    <?php

     

    require_once '../functions/functions.php';

    $shopping_cart = get_shopping_cart();

    echo render_header();

    $product_id = $_REQUEST['id'];

    echo $product_id;

     

    if (product_exists($product_id))

    {

    #echo '  product exists!';

    $shopping_cart->AddItem($product_id);

    }

     

    set_shopping_cart($shopping_cart);

    echo render_paypal_checkout($shopping_cart);

    echo render_footer();

     

    ?>

  3. I don't think there is much you can do about that, besides rewriting the functionality. When you visit that specific URL, it will automatically add the specified item to the cart. Probably a better option would be to split up the current shopping cart functionality into two pages: have an "add.php" page which handles adding the item to the cart, and then redirects to the cart page, which would show the items in the cart.

     

     

     

    But the behavior is bad right?

  4. I finish the php shopping cart videos series.

     

    I have an issue when I click the PayNow button and immediately press the go back button on the browser.

     

    The problem is that when I go back to the shopping cart page, from the paypal page immediately , the quantity adds one automatically.

     

     

    How I can fix that?

     

    Thanks

  5. Hi,

     

    I'm doing the php shopping cart tutorial.

     

    I have a issue with the fom to send to paypal.

     

    In the video you have this:

     

    <form action='".PAYPAL_FORM_URL."' method='post'>

    <input type='hidden' name='business' values='".PAYPAL_BUSINESS_VALUE."' />

    <input type='hidden' name='cmd' values='_cart' />

    <input type='hidden' name='upload' values='1 />

    <input type='hidden' name='currency_code' values='USD' />

    <input type='hidden' name='lc' values='US' />

    ".render_shopping_cart($shopping_cart)."

    <input type='image'src='http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif' name='submit' alt='Make payments with PayPal - it's fast, free and secure!'>

    </form>

     

     

     

    But when I generate the code, paypal is generating the following:

     

    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">

    <input type="hidden" name="cmd" value="_s-xclick">

    <input type="hidden" name="hosted_button_id" value="HS5DM4A8VZ274">

    <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">

    <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">

    </form>

     

     

    Then, when I press the Buy Now button, paypal tell me this:

    "You have requested an outdated version of PayPal. This error often results from the use of bookmarks."

     

     

    I think paypal has changed some things. Some idea of ​​the changes?

     

    Thanks,

    Jose :unsure:

×
×
  • Create New...