Announcement

Collapse
No announcement yet.

Shopping Cart

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shopping Cart

    So, I have my own javascript shopping cart and I can add all my items to it and post the total due to the FaaS processor. However, to keep track of the individual transactions within the reporting tool inside of Click&Pledge, I need each item in the basket to post as a transaction. Is there a way to post a shopping cart to C&P and have it parse out the individual transactions? Are there custom fields that I can use for this purpose? If not, can I loop through my shopping cart and post each individual transaction (keeping in mind that I need the callback api to update my database for each transaction)?
    Thanks.

  • #2
    Good day @nyway:

    Each item in the FaaS form is an item in the report. If you post 5 line items to the FaaS processor you will see 5 items in the report for that transaction.

    ItemName1
    ItemName2
    ItemName3
    ItemName4

    the above will have 4 items in the report with the value of ItemName1, 2, 3, 4 listed as product name.

    I am not sure I understand your question so I am not quite sure if my answer is what you are looking for.
    Regards,
    Click & Pledge Support Department

    On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
    Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

    Comment


    • #3
      Thanks. I'm not articulating this very well, but hopefully I can clear it up. I have my own shopping cart complete outside of C&P. I am currently totaling everything up and posting the balance due in one form. I am sending all of my items in the RefNo so that when I get the callback, I can update my sql tables indicating they have paid. However, our accountant needs each line item and not just the total paid on the C&P reports, so I need to submit each individual item to C&P so that I can reconcile my club payments. But, I still need the callback API to update my sql tables. So, I was thinking of looping through each item in the shopping cart and just posting the form with javascript for each transaction. However, I can only get the callback API on the first submission and then everything stops. I really need to get the transaction items posted and the C&P shopping cart is too limiting for me. Any suggestions.

      Comment


      • #4
        Originally posted by Support.Department View Post
        Good day @nyway:

        Each item in the FaaS form is an item in the report. If you post 5 line items to the FaaS processor you will see 5 items in the report for that transaction.

        ItemName1
        ItemName2
        ItemName3
        ItemName4

        the above will have 4 items in the report with the value of ItemName1, 2, 3, 4 listed as product name.

        I am not sure I understand your question so I am not quite sure if my answer is what you are looking for.
        I understand what you're saying now. I updated my cart to do as you describe above. A couple of issues came up. I'm getting kicked to the error url telling me my item ids are invalid. Do the item ids HAVE to exist on the c&p gateway? I'd like to use item ids since they are my customer numbers and it would be ideal to have them in the audit reports. However, there's no way I can add them all to c&p. Is there a setting that allows me to shut off the item id validation?

        Also, even though I got kicked to the error page, my OnSuccessUrl got called too. My database records were updated to a status of paid and the only thing that does that is the OnSuccessUrl. Why would that url get called even though the OnErrorUrl was called due to error?

        Thanks for all your help.

        Comment


        • #5
          Good day @nyway:

          ItemID's are independent of Click & Pledge's portal. ItemId's are numeric values and I am not sure what you are passing so I can't tell you why you are getting invalid ID's.

          There is no way for 2 URL's to be called since the API responds once to each request. Once we post back a request we don't do anything else with it.

          You may want to test your posts to us by posting to https://VERIFY.FaaS.Cloud.ClickandPledge.com -- that URL will show you all the values that you are posting to the server.

          Let me know what ID's you are passing so we can review your entries.
          Regards,
          Click & Pledge Support Department

          On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

          Join us @ the educational webinars: https://clickandpledge.com/webinars/
          Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
          Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

          Comment


          • #6
            Originally posted by Support.Department View Post
            Good day @nyway:

            ItemID's are independent of Click & Pledge's portal. ItemId's are numeric values and I am not sure what you are passing so I can't tell you why you are getting invalid ID's.

            There is no way for 2 URL's to be called since the API responds once to each request. Once we post back a request we don't do anything else with it.

            You may want to test your posts to us by posting to https://VERIFY.FaaS.Cloud.ClickandPledge.com -- that URL will show you all the values that you are posting to the server.

            Let me know what ID's you are passing so we can review your entries.
            I'm inching closer with this. I've passed everything I want into the basket variables defined on the form fields page for FaaS. Now, I'd like to report on all of the item transactions that I've passed through C&P. I can't find any of the basket variables (ItemID, ItemName, etc) in the list of available fields when I try to create a report. They must exist somewhere because I see them in the detailed standard reports. Am I supposed to type them in manually or is there some other action to take to find the basket variables for custom reports?

            Comment


            • #7
              Good day @nyway:

              By "report" are you referring to the report you can download through the Portal?

              Item name and SKU are all in the report. Are you downloading the Detailed report or the Consolidated report? Consolidated report does not have item names since it only shows the payment information. Detailed report shows every item in the basket.

              Please let me know if the info you are looking for is not in the "detailed" report.
              Regards,
              Click & Pledge Support Department

              On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

              Join us @ the educational webinars: https://clickandpledge.com/webinars/
              Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
              Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

              Comment


              • #8
                Originally posted by Support.Department View Post
                Good day @nyway:

                By "report" are you referring to the report you can download through the Portal?

                Item name and SKU are all in the report. Are you downloading the Detailed report or the Consolidated report? Consolidated report does not have item names since it only shows the payment information. Detailed report shows every item in the basket.

                Please let me know if the info you are looking for is not in the "detailed" report.
                Yes, when I'm in the "build a report" form, I don't see any of the basket variables there (other than SKU). Here is the list of available fields that shows up for me to add to my report:

                AccountID, Transaction Date, Transaction Date (Account TimeZone), Checkout Page ID, PatronID,Item, SKU, First Name, MI, Last Name, Phone, Email,Order Number, Quantity, Total, Payment Name, Fee Fix Price, Shipping Method, Credit Card xxxx4,Response, Coupon Code, Status, Address1,Address2, Zip Code, City, State/Province, Country,IP, Shipping First Name, Shipping MI, Shipping Last Name, Shipping Email, Shipping Address1, Shipping Address2, Shipping City, Shipping State/Province,Shipping Zip Code, Shipping Country, Check Issue Date, Check Number, Check Amount, Check Cashed Date, Custom Questions (All in one), Custom Questions (Separate column(s)), Tracker,Campaign Name, Installment Information,Installment#, Installments Made, Next Installment Date, Recurring Periodicity, Internal Note,UrlReferrer, Fundraiser AliasName, Fundraiser First Name, Fundraiser Last Name, Fundraiser Email

                I don't see any of the cart variables that I submitted (ItemID, ItemName, Quantity, UnitPrice, Campaign, Other). How can I report on those if they're not in the list of available fields? Or are they just named something else that I'm not putting together?

                Thanks.

                Comment


                • #9
                  Good day,

                  You have selected the Consolidated report. Please choose the Detailed report.

                  Click image for larger version

Name:	Report_ItemName.jpg
Views:	1
Size:	149.3 KB
ID:	15256

                  Please let me know if this resolves your issue.
                  Regards,
                  Click & Pledge Support Department

                  On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

                  Join us @ the educational webinars: https://clickandpledge.com/webinars/
                  Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
                  Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

                  Comment


                  • #10
                    Originally posted by Support.Department View Post
                    Good day,

                    You have selected the Consolidated report. Please choose the Detailed report.

                    [ATTACH=CONFIG]859[/ATTACH]

                    Please let me know if this resolves your issue.
                    That's the same item list from the detailed report. When I add the "Item" variable from the list, it is not the item from the basket. I'm not sure what it is. It returns things like Payment, Convenience Fee, Shipping, Discount, Tax. I did go back and verify that it is a detailed report and that is the only item list I am presented with.

                    Comment


                    • #11
                      Good day @NYWay:

                      I reviewed your account & I think you are doing something wrong. The following is the report from your account:

                      Click image for larger version

Name:	NYWay-Form.jpg
Views:	1
Size:	93.0 KB
ID:	15257

                      as you can see all your items are named "Payment". It seems like ItemName is being changed to "Payment"

                      The following is the output from the form shown here: https://www.clickandpledge.com/Platf...s/example/001/

                      The report for doing the default fields - simply post what is already filled:

                      Click image for larger version

Name:	Test_Form.jpg
Views:	1
Size:	74.2 KB
ID:	15258

                      as you see item names are all as set in the form.

                      I reviewed your XML posts to the API server and retrieved one of your log entries. See below:

                      Click image for larger version

Name:	NYWay_XML.jpg
Views:	1
Size:	76.5 KB
ID:	15259

                      The ItemName is posted as "Payment" as is clearly seen.

                      The system is showing you the report exactly as you are posting it. Anything else would be a surprise.

                      Let me know if we can be of any help.
                      Regards,
                      Click & Pledge Support Department

                      On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

                      Join us @ the educational webinars: https://clickandpledge.com/webinars/
                      Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
                      Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

                      Comment


                      • #12
                        Thanks, but I'm not even sending ItemName in my post array. I'm using a home grown javascript shopping cart. I am looping through my shopping cart and setting the sequentially counted basket variables in accordance with the form field documentation. For example, for a single item in the cart, this is my post array:

                        <input name="SKU1" type="hidden" id="SKU1" value="100275">
                        <input name="Campaign1" type="hidden" id="Campaign1" value="Titletown Fight Club">
                        <input name="Other1" type="hidden" id="Other1" value="C">
                        <input name="ItemID1" type="hidden" id="ItemID1" value="100275">
                        <input name="ItemName1" type="hidden" id="ItemName1" value="Titletown Fight Club">
                        <input name="Quantity1" type="hidden" id="Quantity1" value="1">
                        <input name="UnitPrice1" type="hidden" id="UnitPrice1" value="78">

                        At no point, do I assign the variable "ItemName" in the post array - at least not without a sequential counter after it. I know all of my items are saving because if I run a system report for detailed transactions instead of a custom report, I see some of my cart variables in there. All I want to do is add the additional cart variables above to this report. If you look at the attached image, it is a screen print from a system detailed report. The top five transactions were posted as sequential items in a basket array. Those are perfect (the price is over in a column to the right). All I want to do is add the Campaign and Other variables to it (and remove a lot of stuff). So, I know my variables have made it to the C&P system. I just need to know how to extract them out. Doesn't seem like it should be this difficult.

                        Thanks for your patience.
                        Attached Files

                        Comment


                        • #13
                          Good day @NYWay:

                          A quick answer to your question and then some explanation of how the system works.

                          Campaign and the variables that are not in the report are set up to post to Salesforce. Our Salesforce integration shows all these in the transactions and reports in Salesforce. We will consider adding them to our standard reports in one of the upcoming releases.

                          You stated that you are not posting <ItemName> so I just would like to give you a little overview of how the system works and what we mean when we say <ItemName>.

                          Since you are a programmer I am hoping you appreciate the inner working of the API and that the following helps you with your program. It is always best to understand how something works so when you are faced with issues you can figure out the answer easily. Here we go!

                          The FaaS processor is a wrapper for our main API platform. The API platform works based on XML and as such items are ordered according to their nodes. Here is an example of how an item is listed as XML:

                          Reference: http://manual.clickandpledge.com/OrderItem.html

                          <OrderItemList>
                          <OrderItem>
                          <ItemID>1</ItemID>
                          <ItemName>Donation</ItemName>
                          <Quantity>1</Quantity>
                          <UnitPrice>1000</UnitPrice>
                          <UnitDeductible>1000</UnitDeductible>
                          </OrderItem>
                          </OrderItemList>

                          In the API multiple items are listed as multiple <OrderItem> nodes such as the following:

                          <OrderItemList>
                          <OrderItem>
                          <ItemID>1</ItemID>
                          <ItemName>Donation</ItemName>
                          <Quantity>1</Quantity>
                          <UnitPrice>1000</UnitPrice>
                          <UnitDeductible>1000</UnitDeductible>
                          </OrderItem>

                          <OrderItem>
                          <ItemID>2</ItemID>
                          <ItemName>Donation 2</ItemName>
                          <Quantity>1</Quantity>
                          <UnitPrice>1000</UnitPrice>
                          <UnitDeductible>1000</UnitDeductible>
                          </OrderItem>

                          </OrderItemList>


                          Since in the XML all items are in their respective nodes one can easily determine which quantity goes with what name and what quantity, etc. A node has in it all the relevant information for that item.

                          In the FaaS processor we don't have the luxury of ordered items since the service receives the HTML post as ordered fields so we never know, in case of multiple items, which <ItemName> goes with which <Quantity>. To help developers with this issue we have offered a numeric addition as a suffix to the <ItemName> so if you have 3 items you can define the family of attributes that goes with that item with the same suffix. For example:

                          <input name="UnitPrice1" type="text" id="UnitPrice1" value="5" size="10" />
                          <input name="UnitDeductible1" type="hidden" id="UnitDeductible1" value="100%" />
                          <input name="ItemID1" type="hidden" id="ItemID1" value="1" />
                          <input name="ItemName1" type="hidden" id="ItemName1" value="Cause 1" />
                          <input name="Quantity1" type="hidden" id="Quantity1" value="1" />
                          <input name="SKU1" type="hidden" id="SKU1" value="123-ABC" />



                          <input name="UnitPrice2" type="text" id="UnitPrice2" value="10" size="10" />
                          <input name="UnitDeductible2" type="hidden" id="UnitDeductible2" value="5" />
                          <input name="ItemID2" type="hidden" id="ItemID2" value="2" />
                          <input name="ItemName2" type="hidden" id="ItemName2" value="Cause 2" />
                          <input name="Quantity2" type="hidden" id="Quantity2" value="1" />
                          <input name="SKU2" type="hidden" id="SKU2" value="456-DEF" />

                          The above would have equally worked if we had numbered the groups as:

                          <input name="UnitPrice1" type="text" id="UnitPrice1000" value="5" size="10" />
                          <input name="UnitDeductible1" type="hidden" id="UnitDeductible1000" value="100%" />
                          <input name="ItemID1000" type="hidden" id="ItemID1000" value="1" />
                          <input name="ItemName1000" type="hidden" id="ItemName1000" value="Cause 1" />
                          <input name="Quantit1000" type="hidden" id="Quantit1000" value="1" />
                          <input name="SKU1000" type="hidden" id="SKU1000" value="123-ABC" />



                          <input name="UnitPrice2" type="text" id="UnitPrice2" value="10" size="10" />
                          <input name="UnitDeductible2" type="hidden" id="UnitDeductible2" value="5" />
                          <input name="ItemID2" type="hidden" id="ItemID2" value="2" />
                          <input name="ItemName2" type="hidden" id="ItemName2" value="Cause 2" />
                          <input name="Quantity2" type="hidden" id="Quantity2" value="1" />
                          <input name="SKU2" type="hidden" id="SKU2" value="456-DEF" />



                          As long as the family has the same numeric suffix the system will work.

                          So far so good!

                          When I refer to <ItemName> I don't mean it in an absolute sense, meaning I don't literally mean ItemName but I am referring to the family regardless of the number.

                          Are you using Salesforce? If so please check the Transaction and the Opportunity records and you will see all posted items.
                          Attached Files
                          Regards,
                          Click & Pledge Support Department

                          On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

                          Join us @ the educational webinars: https://clickandpledge.com/webinars/
                          Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
                          Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

                          Comment

                          Working...
                          X