Need an experienced "PayPal developer" ??

by 13 replies
15
I actually need to know first if this can be done.

I currently have Buy It Now buttons for my bookmarks, which you can see throughout my site (just View Source on any of the pages that have a PayPal Buy It Now form on it). I don't "think" I need "shopping carts" or Add to Cart buttons.

What I DO need, if it can be done, is to allow the customers to enter their own quantity of at least 10 and have the code calculate the price each depending on how many they order.

So for instance, if they order from 10-25, the bookmarks are $1.95 each; 26-50, $1.75 each, and so on - on the concept of "the more you buy, the less cheaper they are."

For example, can this section of the code be rewritten to accommodate the above:











I've seen PayPal's code variables but I'm clueless as to how to build them into the current Buy It Now codes. :confused:

The way I have things set up now is pretty easy for most of my customers unless/until they need different quantities other than sets I have listed above. In fact, for my last three orders I actually took the orders over the phone, provided a quote and invoiced them through PayPal, whereas they could have easily just ordered online if the order forms were set up properly.

Would someone be able to help me with this? And if so, would you provide a quote to do this?

Thanks very much!!
#programming #developer #experienced #paypal #paypal developer
  • I don't think PayPal has that kind of an option that can change dynamically.. But you can that with some simple JavaScript =)

    Hook a simple "onChange" event to the dropdown menu and have the price be changed dynamically.

    i.e:

    PHP Code:
    <input type="hidden" name="item_name" id="pp_item_name" value="Quantity of 1" />
    <
    input type="hidden" name="amount" id="pp_amount" value="1.95" />
    <
    input type="text" name="f_quantity" onChange="javascript:amtChange(this.value)" value="1" />

    <
    script type="text/javascript">
        var 
    discount_matrix = [
            
    0.0// 0% discount
            
    0.11 // 11% discount
            // and etc...
        
    ];

        function 
    amtChange(amt) {
            var 
    ppin document.getElementById('pp_item_name');
            var 
    ppamt document.getElementById('pp_amount');
            if ((
    amt parseFloat(amt)) > 0) {
                
    ppamt.value = (1.95 amt) * (discount_matrix[floor(amt 25)]);
                
    ppin.value "Quantity of " amt;
            }
        }
    </script> 
    I wouldn't guarantee that code will work but you should get the idea =)
    • [ 1 ] Thanks
    • [1] reply
    • Thanks Dr. X - only problem - I'm not a programmer. I really have no idea what to do here.

      So how much would you charge to "fix" my code for me? If it's something that I can simply copy/paste into my codes, that would be great.

      In other words, I only need one of my codes to work and I can copy/paste it into my codes on the various pages since all of the codes have the exact sets and prices anyway.

      For instance, here is an entire Buy It Now button code from one of my pages:


      Pretty much all that changes from one page to the next are the design names and everything else stays the same. So if I can have just one of these codes work correctly, I can update the rest of them myself by just copy/pasting the updates into the other codes.

      Let me know. Thanks!
  • The problem with that is that the script could be manipulated by anyone with the right browser tools. You'll need to make sure the calculations are correct on your end before you ship anything.
    • [1] reply
    • How would they do that? :confused: I'm not much on the behind-the-scenes stuff here. I actually just about failed C++ in school and never signed up for the rest of the courses to get into php, java or anything code related. I figured I'll just stick to html/css and bookmark design and try to make enough money to pay someone else to do the complicated stuff for me. LOL
      • [1] reply
  • lol ^^

    I can do it, but I'm not home right now so don't have much time to work on it. And plus I don't work on small projects - but for the sake of trying to be a good asset to WF I might as well just do it for free =)

    And yea, data manipulation is pretty easy, don't got too much time to explain right now lol
    • [1] reply
    • I'd pay you! You don't have to do it for free!
  • x319
    What would be really cool is if you posted the code here so that we could all use it.
    If you are doing it for free you may as well right?
  • PayPal has option for custom field which will passed to their server after submission.
    Basically what you have to to is to pass selected option to paypal as custom field that's it. So set up an listener to receive response from paypal and you can automate entire purchase and delivering process.
    • [1] reply
    • I'm sorry, kaido. Thank you very much for your suggestion but I have no idea what any of that means. :confused:

Next Topics on Trending Feed

  • 15

    I actually need to know first if this can be done. I currently have Buy It Now buttons for my bookmarks, which you can see throughout my site (just View Source on any of the pages that have a PayPal Buy It Now form on it). I don't "think" I need "shopping carts" or Add to Cart buttons.