ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Simple Commerce Walkthrough

March 05, 2012 12:21pm

Subscribe [4]
  • #1 / Mar 05, 2012 12:21pm

    thefifthlion

    133 posts

    I don’t understand how to setup items through the Simple Commerce control panel. Do I simply add a channel titled subscriptions and then publish one entitled Basic and one entitled Pro…? Then choose them in the Add Item panel? Trying to understand why the channel is needed?

    Stuff I’ve managed to figure out:
    • Simple Commerce installed
    • Simple Commerce Preferences Setup
    • Sandbox accounts setup
    • IPN setup + added to prefs

  • #2 / Mar 06, 2012 12:46pm

    Shane Eckert's avatar

    Shane Eckert

    7174 posts

    Hello

    Thank you for posting your questions.

    I would be happy to help you with the Simple Commerce Module.

    The channel is going to hold your product details. You will set up your items and then use Add Item to bring the channel entry into the store. So the actual items are your channel entries.

    Does that make sense? Please let me know if you need more clarification or if I can help you with anything else.

    Cheers,

  • #3 / Mar 08, 2012 4:41pm

    Duncan McCall

    46 posts

    I am in about the same spot as thefifthlion. I set up a channel for the store items. Do I need a channel to store the purchase transactions or is that handled?

    I assume I am to define a channel field for buy_now_url? Where do I get that URL from? I know how to get code for a button, but I am not seeing just a URL.

    I set up sand box accounts and did a test transaction with a button. It looks like it works in PayPal, but the payment does not show in simple commerce. I feel like I’m missing something basic.

    EDIT—————————-

    Ok, I figured out how the buy_now_url works. I thought I need a URL from PayPal like you create a button.

    I switched to live testing with small amounts on the recommendation from some forum posts. I have not been able to get the IPN to work. I have tried everything I have found so far in the forums. I did see one mention I did not understand. Does the IPN not work if the buyer pays by credit card and not sign into pay pal, or was that just with the sand box?

  • #4 / Mar 09, 2012 4:52pm

    Dan Decker

    7338 posts

    Hi Bryan,

    I’m sorry you are having trouble with Simple Commerce and IPN. Did you see this User contribution in the User Guide?

    If you’re having trouble with orders not being tracked, make sure that the PayPal Account you specify in the Simple Commerce settings is your primary PayPal email address. If you specify a secondary PayPal email address then transactions will always fail.

    Can you verify your email settings with PayPal and let me know what you find out.

    Cheers,

  • #5 / Mar 09, 2012 6:39pm

    Duncan McCall

    46 posts

    Thanks for your help. That actually was the problem. I was using the Merchant ID number rather than the email address.

    I have another question. When I was not getting IPN to work, I found another way to associate the payments with members by reading a post in the wiki—using a hard coded form to pass custom info.

    This now works with IPN:

    {exp:simple_commerce:purchase entry_id="34" success="artists/success/" cancel="artists/fee-payment"}
    
           <h3>{item_name}</h3>
    
    <p>       <strong>{item_sale_price}</strong></p>
    
    <p> <a >Make Payment</a></p>
    
    <p>{/exp:simple_commerce:purchase}

    This works with PayPal but not the IPN:

    {exp:simple_commerce:purchase entry_id="34" success="artists/success/" cancel="artists/jury-fee"}
    Fee: <strong>${item_sale_price}</strong>
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
    <input type="hidden" name="cmd" value="_xclick"/>
    <input type="hidden" value="http://yyy.com/yy/?ACT=23" name="notify_url"/>
    <input type="hidden" value="http://yyy.com/yy" name="return"/>
    <input type="hidden" value="http://yyy.com/yy" name="cancel_return"/>
    <input type="hidden" name="business" value="yyy@yyy.com"/>
    <input type="hidden" name="currency_code" value="USD"/>
    <input type="hidden" name="item_name" value="{item_name}"/>
    <input type="hidden" name="item_number" value="App {member_id}"/>
    <input type="hidden" name="upload" value="1"/>
    <input type="hidden" name="custom" value="{member_id}"/>  
    <input type="hidden" name="amount" value="{item_sale_price}"/>  
    <input type="hidden" name="quantity" value="1"/>  
    <input class="btn" type="submit" name="buy_now" id="buy_now_34" value="Pay Now">
    </form>
    {/exp:simple_commerce:purchase}

    The returned values from the IPN debug email look almost identical, except for the stuff I am changing.

    Is there something obvious I’m missing?

  • #6 / Mar 09, 2012 10:07pm

    Duncan McCall

    46 posts

    Never mind, I was trying to be too clever. Trying to set a custom item number broke the link to the item in SC.

    You can pass info to pay pal using the invoice field.

    <input type=“hidden” name=“invoice” value=“1234”/>

  • #7 / Mar 11, 2012 1:38pm

    Sean C. Smith's avatar

    Sean C. Smith

    3818 posts

    Bryan,

    Sounds like everything is working now. Is there anything else I can assist you with?

    Sean

  • #8 / May 15, 2012 11:25am

    thefifthlion

    133 posts

    Shane/Dan,

    Can you elaborate on your reply below?

    So I’ve setup a channel named “subscriptions” and I’m wondering what to do next. Do I create field group/custom channel fields with basic stuff like name and description? And then set the simple commerce item variables through the add item settings? Just trying to figure out what’s needed in the custom fields?

      item_id
      item_name
      item_enabled
      item_purchases
      item_regular_price
      item_sale_price
      item_use_sale
      item_type

    ———————-

    The channel is going to hold your product details. You will set up your items and then use Add Item to bring the channel entry into the store. So the actual items are your channel entries.

    Does that make sense? Please let me know if you need more clarification or if I can help you with anything else.

    Cheers,

  • #9 / May 18, 2012 4:52pm

    Dan Decker

    7338 posts

    Hi thefifthlion,

    Sure thing!

    Simple Commerce handles the transaction, pricing and sale management, etc.

    Any descriptive information you want to keep about the items is managed in the channel as entries.

    Does that help clarify?

    Cheers,

  • #10 / May 18, 2012 4:55pm

    thefifthlion

    133 posts

    Do I need to setup the products on Paypal as well or is it that handled through the Simple Commerce item control panel? Was hoping to avoid redundancy.

  • #11 / May 18, 2012 5:26pm

    Boyink!'s avatar

    Boyink!

    5011 posts

    No,  you shouldn’t have to setup individual products in PayPal.

  • #12 / May 22, 2012 4:21pm

    Shane Eckert's avatar

    Shane Eckert

    7174 posts

    Hello thefifthlion,

    Is there anything else we can help you with?

    Cheers,

  • #13 / May 29, 2012 11:29am

    thefifthlion

    133 posts

    Hi Shane,

    After wrestling with Paypal’s sandbox I managed to get it all working. When I open the Simple Commerce module in the control panel and view items I see a column that reads “Current Subscriptions.” I’m confused as to what this column/field represents? The “Purchases” column shows “1” but current subscriptions shows 0?

  • #14 / May 30, 2012 8:16am

    Boyink!'s avatar

    Boyink!

    5011 posts

    SCM allows you to sell subscriptions as well as regular product.

  • #15 / May 30, 2012 10:27am

    thefifthlion

    133 posts

    Boyink,

    First up, thanks for answering so many of my questions in the past.

    When I add an item in Simple Commerce I simply set it to recurring and set the frequency to make it a subscription correct? I’m using the following code. It all seems to work yet in the control panel under the “items” view there is a column titled “Current Subscriptions” and it is empty. I’m just trying to figure out what that column is for. Is it the number of subscription periods that have elapsed? This would make sense since the column is empty.

    {if item_type == "subscription"}
                   <a >Subscribe Now</a>
           {/if}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases