• I want to show “%remaining%”, “%bought%” and “%limit%” on frontent, is there any way to show these things on frontend.

    Regards
    – Ahmad Raza

    • This topic was modified 2 months, 2 weeks ago by Ahmad Raza.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @ahmadraza9,
    ?
    Thanks for reaching out.
    ?
    By default, the plugin should display the limit notice with these placeholders on the frontend when the user tries to add a product beyond the limit. Please check our “Frontend” section of our plugin, where you can edit these notices with different placeholders. But if, in your case, the message is not being displayed, then could you please enable the “Validate on add to cart” in the “Frontend” section of the plugin?

    Kind regards.

    Hi @moshtafizur01
    Yes I have enable “Validate on add to cart” in the “Frontend” section. But I want to show all of these things “%remaining%”, “%bought%” and “%limit%” on Woocommer My Account page.
    And Please let me know where you save product limit data in database. In user meta or product meta

    Is there any way to limit product based on the ACF filed or any value.
    Please let me know

    Thanks for your contribution
    Regards
    – Ahmad Raza

    Plugin Contributor Pablo Pacheco

    (@karzin)

    Hi,

    You could try the [alg_wc_mppu_current_product_limit] shortcode. Example:

    [alg_wc_mppu_current_product_limit msg_template="You can only buy maximum %limit% of %product_title% (you\'ve already bought %bought%). The remaining amount is %remaining%."]

    Parameters allowed:

    • user_id – The user id. By default, tries to get the current user id.
    • product_id – The Product id. By default, tries to get the current product id.
    • msg_template – The message template. Here you can use the placeholders.
    • condition – The condition to display the message. Please check Frontend > Product limit message > Condition.
    • output_template – The message wrapper. Default value: <span class="alg-wc-mppu-current-product-limit">{msg_template}</span>.

    Regarding the product limit data, this plugin is kind of complex. If you’re using the option Limits > Per product, this value will be saved as _wpjup_wc_maximum_products_per_user_qty on the postmeta table. If you use the Formula section to handle the product limits, it will be saved on the options table as alg_wc_mppu_formula.

    Other than that, we’re saving the purchase info from orders on the postmeta and termmeta tables as _alg_wc_mppu_orders_data and _alg_wc_mppu_totals_data.

    I’m using above shortcode on woocommerce my-account page but it’s not showing messages

    I want to show remaining products limit on woocommerce my-account page.
    All of these shortcode you provided are not working.
    And I can’t get any limit data in user meta.

    Plugin Contributor Pablo Pacheco

    (@karzin)

    The shortcode [alg_wc_mppu_current_product_limit] will depend on the product_id parameter, or to be used on a product page.

    If you want to display the limits for all the products on my account page, you might want to try our Frontend > My account tab > Enable tab option. Have you tested it?

    Thread Starter Ahmad Raza

    (@ahmadraza9)

    Please have a look above image, I already have ‘Product limits’ on my-account page, my question is I want to get user limit on my-account page using shortcode, Like if user logged in and his maximum product download limit is 4 so I want to show 4 on my-acount page not whole products limit as shown in above attached image.

    Plugin Contributor Pablo Pacheco

    (@karzin)

    Unfortunately, I don’t believe we have a user limit for now, without specifying it by product or by term.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.