• Unsolicited email of the day

    I, too, am not aware of all the wisdom inside me
  • Showing a product’s maximum variant price in Shopify Liquid

    When you have a product with multiple priced variants, many Shopify themes default to showing “from [lowest variant price]”. If you prefer to just show the highest price, that’s easy to do in Liquid:

    {{ product.price_max | money }}
  • Radio Shack Pro-76 Test Modes

    The PRO-76 was a simple, no-frills scanning receiver manufactured for Radio Shack by Uniden in the early 2000s.

    The PRO-76 has some features and test modes that can be accessed by holding down various keys while turning the radio on. None do anything particularly interesting (to me), but maybe others will find these useful.

    KeysWhat It Does
    2-9Shows “Clear” on the screen and clears memory.
    2-9-SCANShows “Load” on the screen. When the “Load” message is gone, Channels 1-15 are replaced with test frequencies.
    2-9-PROGShows “000 00” on the screen. Pressing the up and down keys changes the hexadecimal value on the screen. Unclear what this does.
    2-9-MONThe same as 2-9.
    2-9-PRIThe same as 2-9-SCAN.
    2-9-DELAYThe same as 2-9-PROG.
    2-9-L/OUTDoes a limit search on 173.0 – 173.1.
    2-9-ALERTClears the memory, but if the radio is already cleared (all memories are zeroed out), it flashes “ALERT” on the screen.
    2-9-KEYLOCKStarts weather search mode.
    2-9-HOLDClears the memory.
    2-9-.Shows “H WIRED” message on the screen.
    2-9-0Performs display test. When E is pressed, it loads test frequencies into memory. (If the radio is turned off at this point, no test frequencies are loaded.)
    2-9-ESame as 2-9-0.
    L/OUTThis lets you configure the beep that plays when you press a key. Normally, when you turn the radio on with this key held down, it displays “NO BEEP” before going to the regular scan mode, after which the radio will not beep when you press keys on the keypad. To turn the beep back on, press it again and it will say “ON BEEP.” The beep will be restored.
  • Making Shopify conversion scripts conditional on backorder status

    In some environments, it can be helpful to have the ability to run scripts in Shopify’s checkout based on whether the order placed was a preorder, backorder, or other scenario where the item was out of stock when the order was placed.

    For example, if you integrate with an outside service to suggest product reorders or solicit reviews for your products, you may want to do things differently for an order that will ship right away versus an order that will ship in three weeks.

    Thankfully, this is pretty easy to approximate in Liquid. Simply do something like this from the Settings > Checkout screen in the Order Status Page > Additional Scripts section:

    {% if first_time_accessed %}
       {% assign has_bo = 0 %}
       {% for line_item in checkout.line_items %}
          {% if (line_item.variant.inventory_quantity < 0) and (line_item.variant.inventory_management == 'shopify') %}
             {% assign has_bo = 1 %}
          {% endif %}
       {% endfor %}
       {% if has_bo == 0 %}
          <!-- Script goes here -->
       {% endif %}
    {% endif %}

    The first condition, “if first_time_accessed”, is Shopify magic specific to the Order Status page. It simply indicates that this Liquid template section should only run the first time the customer sees the Order Status screen for that order (on checkout), not any time they stop back to check on their order.

    We then loop through the line items and determine if any are backordered, based on whether the item has inventory control enabled (line_item.variant.inventory_management == ‘shopify’) and inventory quantity for the item (line_item.variant.inventory_quantity) is negative.

    Note that while this simple script worked well enough for my purposes, there is the possibility of a race condition in a high-volume store in a scenario where, in the moment between an in-stock order being received and the customer seeing the order status (order confirmation) screen, another order is processed taking the inventory below zero. If data integrity in a scenario like that is important, it would be smart to use workflows and order metafields to store the backorder status immediately upon the order being received.

  • Fixing Roomba “Obstacle area review will normally appear here” error

    When I first set up my Roomba j7+, I opted out of the “Obstacle Image Review” feature. A few days later, I tried to enable it, but would get a message saying “Something went wrong. Obstacle area review will normally appear here” every time I’d try to view a prior run.

    Following these steps helped me to get this feature working, without losing my existing maps:

    1. Navigate to iRobot > Product Settings > About Roomba > Remove Device from Account
    2. Ensure the “Save maps during factory reset” option is selected
    3. Tap the red “Factory Reset” button
    4. Using the iRobot app, set up the device again
    5. Tap the “Map” button. You may see your maps are missing. DON’T PANIC – they will come back later.
    6. Tap Product Settings > Reboot and allow the device to restart
    7. Wait for the device to fully charge (or maybe just for some amount of time to elapse, I’m not really sure)
    8. Tap “Map” again, and you’ll see an option to download the maps you saved earlier

    If these steps don’t help, this reddit thread has some other ideas, including disconnecting from WiFi and reconnecting, and some ideas specific to the iOS flavor of the iRobot app.

    Happy vacuuming.