Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter glondono

    (@glondono)

    Thanks, worked like a charm

    Thread Starter glondono

    (@glondono)

    Hi,

    Instead of listening for the post back and add the product on php, I tried to recreate the form the Add to Cart button creates with an input visible for price, something similar to this

    <form id="form1" name="form1" method="POST" action="" onsubmit="return ReadForm(this, true);">
    <label for="price">Amount to Donate</label>
    <input id="price" name="price" type="number" step="50.00" value="50">
    <input type="hidden" name="shipping" value="0">
    <input type="hidden" id="classid" name="classid" value="1234">
    <input type="hidden" name="addcart" value="1">
    <input type="hidden" name="cartLink" value>
    <input type="hidden" name="product_tmp" value="S1234-Class ABC">
    <input type="hidden" name="item_number" value="">
    <input type="submit" value="Add to Cart">
    </form>

    on submit, the item is added to the cart correctly and the price and total are also correct but there is no description (no S1234-Class ABC), just a blank line.

    Am I missing a field?

    Thanks

    Thread Starter glondono

    (@glondono)

    I’m displaying a list of classes from another system and I’m using the shortcode to place a add to cart button for each.

    Each class will also have a donate button that will redirect to a page where a person can state the amount and also will have the add to cart button to add it to the cart (with the amount specified).

    I got the redirection and the form in place, also I’m listening for the POST of that form with the amount to donate information but what I’m missing is how to add that amount to the cart in that POST call.

    Thanks for your help.
    The support has been excellent for a free product.

    Thread Starter glondono

    (@glondono)

    .

    Thread Starter glondono

    (@glondono)

    How that feature will work in WP eStore?

    Thread Starter glondono

    (@glondono)

    I’m querying an API with programs information, some of them are free others are paid.

    I’m creating a shrotcode myself to display the list of programs and using the following code to include Simple Paypal buy button on it, in a for loop:

    do_shortcode("[wp_cart_button name='" . $program->ProgramID . " - " . $program->Name . "' price='" . $program->Fee . "']")

    Where $program->Fee is a decimal that could be 0

Viewing 6 replies - 1 through 6 (of 6 total)