• Resolved intowernet

    (@intowernet)


    I’ve read your tutorial “Creating a Payment Button by Dynamically Adding Item Details in the Shortcode” and wonder if there’s a way to specify there only being 1 of a particular item? For example, I have 2 unique products for sale. I’d like to copy/paste the shortcode for each and just have to change the name. That way, once the product sells nobody else can pay for it. Something like below…

    [accept_stripe_payment name=”Product-1″ price=”50″ button_text=”Buy Now” billing_address=”1″ shipping_address=”1″ stock=”1″]

    [accept_stripe_payment name=”Product-2″ price=”50″ button_text=”Buy Now” billing_address=”1″ shipping_address=”1″ stock=”1″]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Hi.

    Single-use shortcodes do not have any kind of stock control options since the database doesn’t have any data regarding those shortcodes.

    Use products instead as they provide more configurable options then shortcodes. Create 2 products Product 1 and Product 2 and set stock options for those.

    Then you can use [asp_product id="123"] and [asp_product id="124"] shortcodes to add those anywhere you like. You can also enable “Show Button Only” on “Appearance” metabox of product edit page to have payment button displayed without any additional info (just like single-use shortcode).

    Thread Starter intowernet

    (@intowernet)

    Thanks for your swift reply!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stock Control for dynamically-generated shortcode product’ is closed to new replies.