We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14779
    • 256 Posts
    I have a single product that I am trying to sell, that has several options that will add to the price. What is the best way to do this with paypal? right now I am using Mals Ecommerce, but I need to switch to paypal. Here is what I am trying to duplicate: http://ww4wusa.com/vendor-registration.html
    I’d like to use eform, and have it submit the total to paypal. I’d also like to have the form display a running total based on the options selected. Notice that only the first through fourth fields alter the price. It is like this:

    Field one: Base price
    Field two: when checked adds $15 to base price
    Field three: when checked multiplies field four x $60 and adds total to base price

    Then I want this final total submitted to Paypal.
      PM me to find out how you can get a FREE ipad 2!
      • 15001
      • 697 Posts
      For field two, you might use price options.
      For field three, why not creating a second product at price of 60$ and multiply it by the quantity given in field four? Some Javascript could do this job.

      In your case (single product), I would try the approach of using an hybrid basket system such as Roman Cart (www.romancart.com) that externalizes the basket system but let you keep your product page as a MODx document.

      You can have a look at this page www.altipoint.ch/ecommerce
      for a comparison of such hybrid system with other solutions.
      The page is currently only in French but you can translate it with Google Translate.
      Look at the "Solutions" tab in the French version. (i.e. the Overview page after Google Translation since the tabs are permuted during translation !)
        • 26016
        • 561 Posts
        Jul,
        C’est merveilleux, thanks for that article! I have been experimenting with various ways to do this, and I had not seen Roman Cart before. I like to read Spanish, but I’d forgotten how easy it is to read Français! The article is quite clear. Merci.

        Josh,
        One of my recent experiments was making a very simple Paypal setup. I made it with just a template and some TV’s. First I grabbed Pay It Now button code from my Paypal account. I stuck this code into a new template, and made some TV’s to plug in values into the Paypal form (replacing the generated ones, obviously).

        To add a product the client makes a page with this template, they use the TV’s to fill in anything like Product, Price, Shipping, Tax, whatever you want to have, and extra info can be added in the content area. The user clicks on the Buy It Now button, and then they can play with quantity, message to merchant, and all that on the Paypal side, not to mention SSL handled on their end. Not Ajaxy and sexy, but dirt-simple and works. Want "Add to Cart" instead, no problem, just add one more parameter to the Paypal form template.

        Presumably someone more finicky about not "leaving the site" and such would have a budget that allows a more frou frou solution. I still think Foxy is a pretty nice thing, and not too expensive.

        To display these product pages, I made a Ditto call to pull in all Product docs. That got me thumbnails and other fields for each product which I can sort any which way. I styled that page to look decent, et voila, a very simple Paypal shop.

        Cheers, D
          MODx and Wordpress development
          Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
          • 15001
          • 697 Posts
          Hi Samba,

          Thanks. If you’re also interested in TreasureChest, a new 1.1 version will be released very soon.
          TreasureChest is however probably harder to set for a unique product.

          There are already a few weeks that I tell "very soon" about the date for releasing TreasureChest 1.1, so it might seem a joke. But it’s not.

          I’m working on the last and probably most difficult part of the code.
          The TreasureChest cart uses two forms: one visible for the user interface and another, hidden, for the checkout with PayPal.
          When the value of a product option changes, the corresponding value in the hidden form can be updated directly by Javascript in TreasureChest 1.0.

          This is not possible in TreasureChest 1.1; since the checkout form is ciphered, the selected options values can only be set later in the checkout form, i.e. just before calling the PayPal gateway.

          These complications make that I was obliged to delay a little bit the new version.
          But it’s a matter of days.

          Bye.

          Julien
            • 26016
            • 561 Posts
            Julien,
            C’est excellent, I’ll watch for it. No need to rush... I’d rather patiently wait for a version that is very solid! I’m very glad to see so many positive ecommerce developments in MODx these days. A little healthy competition is good.

            Specifically, I like the idea of the invisible form. In my workable but crude solution (aka cheap), the form is visible in source, although I suppose that I could use character entities and/or Javascript to get at least a little encryption.

            Jusque le prochaine fois,
            Ciao, Dave
              MODx and Wordpress development
              Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4