• Resolved B

    (@blclda)


    Hi,

    Baymard’s large-scale product-finding testing has consistently shown that there’s a subgroup of users keenly interested in finding items “on sale”.

    Some users enter the site and immediately are concerned with finding the?latest deals. In either case, testing revealed that having a?“Sales”?or?“Deals”?filter-based category is key to helping interested users?quickly locate sale items.

    With this we followed this simple php snippet to create a dynamic sales page, every product that has a discount shows up there.

    However when we apply the discount using your plugin no products show up. The only products that show up there are the ones we manually applied a sale price. Is there a way to have an sales page that populates only the products that are being discounted with your plugin?

    From all the discount plugins this has been the best so far so I want to keep using it.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @blclda,

    Thank you for bringing this to our attention. I apologize for any inconvenience this may have caused. I have escalated this issue to our development team and they will get back to you as soon as possible.

    Please be assured that we take customer feedback seriously and will do our best to resolve this issue as soon as possible. In the meantime, if you have any further questions or concerns, please do not hesitate to let us know.

    Thank you for choosing our plugin and for your patience as we work to resolve this issue.

    Best regards,
    Moshtafizur

    Thread Starter B

    (@blclda)

    Hey! Good morning, no worries, it would be cool if this worked, I’m buying to pro version soon anyways.

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @blclda,

    Sorry for such a late reply.

    Since the plugin v1.6.0, we have a new function that you can use to get all discounted product ids:

    alg_wc_gsd_get_product_ids( $product_query_args = array( 'limit' => -1 ), $incl_on_sale = true, $use_transient = false )

    I.e., in your snippet, replace this:

    $product_ids_on_sale = wc_get_product_ids_on_sale() ? wc_get_product_ids_on_sale() : array();

    with this:

    $product_ids_on_sale = alg_wc_gsd_get_product_ids() ? alg_wc_gsd_get_product_ids() : array();

    The alg_wc_gsd_get_product_ids() function has three optional parameters:

    • $product_query_args – sets which products to check. By default, it’s set to all products, i.e., array( 'limit' => -1 ). This parameter is passed directly to the WooCommerce wc_get_products() function, so you can use all the same parameters as listed in the documentation.
    • $incl_on_sale – if set to true, will return all on-sale products in your shop, including products that you have set on-sale manually, without using our plugin.
    • $use_transient – the function goes through all products in your shop, so it can be rather slow, especially if you have a lot of products. To speed things up, you can store results in a transient by setting the parameter to true. The transient expires after 24 hours.

    P.S. Just in case, we also have a shortcode to display all discounted products, e.g.:

    [alg_wc_gsd_products columns="4" use_transient="no"]

    Please give it a try and let me know what you think.

    Thread Starter B

    (@blclda)

    Hello! I will for sure try this, will get back to you soon, thank you!

    Plugin Author Algoritmika

    (@algoritmika)

    Great! Please let me know if you have any questions.

    Plugin Author Algoritmika

    (@algoritmika)

    I’m going to mark this thread as “resolved” for now, hope that’s ok. Please let me know if there are still any questions/issues.

    Thread Starter B

    (@blclda)

    Hey @algoritmika yes please do, everything went just fine on our end.

    Plugin Author Algoritmika

    (@algoritmika)

    Great ?? Thank you for the update.

    Plugin Author Algoritmika

    (@algoritmika)

    P.S.

    instead of:

    $product_ids_on_sale = alg_wc_gsd_get_product_ids() ? alg_wc_gsd_get_product_ids() : array();

    you can simply do:

    $product_ids_on_sale = alg_wc_gsd_get_product_ids();

    the alg_wc_gsd_get_product_ids() function will return an empty array (if there are no products) anyway.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Show discounted products on the discounted products page?’ is closed to new replies.