Support » Plugin: Stock Locations for WooCommerce » Request: Remove dash from stock quantity at location

  • Resolved jawastriker

    (@jawastriker)


    Hi.
    A small but significant improvement suggestion 🙂

    When available quantity is shown in the shortcode, theres sometimes a dash “-” added between the location and quantity.
    This can lead to some confusion, as it looks more like there’s negative and not positive stock.

    A more appropriate symbol(if that is even needed) would be “:”, although in our case, we already add that to the location name itself.

    I removed the dash from line 267 in class-slw-shortcodes.php , but im unsure if that covers all occurences of the infamous dash 😉

    Thanks in advance 😀

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Follow*

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @olestraume I am resolving this issue, in case you face it again, I will check it again.

    Thread Starter jawastriker

    (@jawastriker)

    Updating this post status to “not resolved” because my update below is just a continuation of the same problem.

    I can see that you did infact update the seperator to be an attribute in the code.
    But I dont see any place in the settings where we can change the sepearator symbol to our own choosing?

    And the default it still a slash, I would again argue that the default sepearator symbol should be a colon.

    : not –

    Cheers, and many thanks 🙂

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    You might be missing the attribute “separator”, kindly try that and confirm

    separator=":"

    Thread Starter jawastriker

    (@jawastriker)

    Hi Fahad,
    Thanks for the quick reply.
    I did find and change the line containing seperator=”-” to “:” thanks 🙂
    But this will not persist through updates to the plugin right?
    Could it be added as an option to the settings menu? So that we can have it persist and still be able to enjoy updates 🙂

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Indeed, and this attribute can be used in the shortcode.

    Thread Starter jawastriker

    (@jawastriker)

    Superb thanks. That wasn’t immediately obvious to me!
    For others to reference, this is the code that does what we need it to do:

    <div class="slw_content" style="font-weight: bold;"><br />
    [slw_product_variations_locations show_qty="yes" show_stock_status="yes" show_empty_stock="no" separator=":"]</div>
Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.