Category: Development

Shopify Show Product Inventory Location Frontend

 

If you want to show the shopify product inventory locations on the frontend, there is no real out of the box way, but I wanted to list the different product locations and inventory in shopify frontend for a customer, so I created an app for it.

it’s not listed in the app store yet, since I want to add it for review after a testing period and then it needs to get reviewed first, but you can already use it like any other app. Instructions down below.

the App will get the inventory location information through the backend API and return it to the frontend.
For performance purposes I’ve currently set the inventory information of a product to be cached for 1 minute, I’m thinking about making this configurable.

I would really like to get some feedback, if you have any features you would like to see let me know

For anyone interested I have added a 30 day free trial for now after that the price will be $4.99 for early birds, this is to get everyone on board in improving the app. when the app is released, it will be 7 day trial with a $8.99 a month price.

Installation instructions:

  1. Install the app by entering your store name here: https://inventorylocations.checkmyapp.net
    the app will add a script to your active theme, that will take care of getting the inventory information
  2. Add this div to the product-template.liquid file of your theme:
     <div id="inventoryLocationInformation">
                <strong>Inventory:</strong><br />
                <span class="inventoryLocationLoading">Loading..</span>
              </div>
  3. That’s it!

 

The app is running on my live server, where some other apps run on too, so you can rest assured that it won’t shutdown without any notice.

 

You can setup which locations you do want to display their inventory for (if you want to hide some warehouse for instance)

screenshot

 

Frontend, app in action: (you can also check it here : https://shipping-demo.myshopify.com/products/test-product

action_app

 

let me know what you think, and if you have any questions / remarks just let me know

Shopify automatic discount for product in cart

In shopify there is no out of the box way to add a discount code when a product get’s added to the cart.

If you have a certain product that you want to add a discount for when it is added to the cart, you can add a hidden input field with your discountcode like this:
comments added for clarity.

in cart-template.liquid Add this just before the “{% for item in cart.items %}” part:

{% assign hasDiscountedProduct = false %}

and this inside the loop (so just below {% assign hasDiscountedProduct = false %} ):

{% comment %} 
  see if we have the discounted product in the cart
  If they need to have 2 different products, you need some extra work (maybe set 2 vars, then after the loop check if both vars are true before adding the hidden field
{% endcomment %}
{% if item.product_id == 10056422096932 %}
  {% assign hasDiscountedProduct = true %}
{% endif %}

You can add some custom content inside the forloop on the discounted product, or just below the endfor, so the customer will see they will get the discount.

Add this snippet just before the form closing tag, so the input get’s posted to the checkout part:

{% comment %} Is a product in the cart valid for using a discount code? let's add the discount code field{% endcomment %}
  {% if hasDiscountedProduct == true %}
    <input type="hidden" name="discount" value="your-discount-code-created-in-shopify" />
  {% endif %}

If you have a lot of products where you want the discount to be automatically added to the checkout, you could add a specific tag to these products like “discounted_product”
and then replace this code:

{% if item.product_id == 10056422096932 %}

with:

{% if item.product.tags contains 'discounted_product' %}

(make sure to hide this tag on the frontend if you display tags on your site)

Top 5 Shopify Apps voor NL Shops

Na aardig wat shopify shops gepubliceerd te hebben leek het me handig om eens een top 5  lijst te maken van shopify apps die ik het meest gebruik, misschien heb je er wat aan 🙂

  • 1. Order Printer (Gratis)
    Met shopify Order printer kan je eenvoudig met HTML layouts maken voor pakbonnen, facturen, etc.. Dit is meestal de eerste app die ik installeer.
    Ook fijn dat je vanuit het order overzicht meerdere orders kan selecteren en direct all pakbonnen er voor uit kunt printen.
  • 2. Marketplace Order Connector (vanaf $19.99 per maand)
    Als je je producten ook op amazon of bol.com aanbiedt, dan kan je met de marketplace order connector eenvoudig amazon orders importeren in shopify of je bol.com orders importeren in shopify. het afhandelen van de orders kan je dan in je eigen shopomgeving doen, de track & trace gegevens van orders worden weer automatisch terug gesynced naar bol.com / amazon.
    Dankzij de marketplace order connector wordt ook de voorraad in de marketplaces up to date gehouden van producten, als er een order in shopify binnenkomt kan de voorraad in amazon / bol automatisch voor je geupdated worden.
  • 3. PostNL Labels aanmaken (vanaf $6,99 per maand)
    Voor het aanmaken van postnl labels in shopify, je kan ook vanuit het orderoverzicht meerdere orders aanvinken, en direct verzendlabels aanmaken.
    Je hebt wel een PostNL contract nodig (voor een apiKey) vanaf 5 pakketten per maand al mogelijk, bij grotere aantallen scherpere pakketprijzen.
  • 4. Discounted Pricing (vanaf $19,99 per maand)
    Een beetje afhankelijk of het bij je store past, met deze app kan je een staffelkorting geven, bijv. 10% korting bij afname van 2 stuks of een vast bedrag aan korting.
  • 5. Trustpilot (gratis)
    Verzamel eenvoudig reviews voor je webshop, ideaal om vertrouwen te kweken bij nieuwe potentiële klanten. Trustpilot maakt gebruik van een unlisted app, je store kan via het trustpilot dashboard gekoppeld worden.
    Je kan instellen dat er een x aantal dagen na bestelling automatisch een uitnodiging verstuurd wordt tot het plaatsen van een review.

Shopify Postnl Labels app

The shopify PostNL Label Print app is approved and listed on the shopify app store

 

You can now print your postnl labels from within the shopify admin.

I’m working hard to add more features, if you have any feature requests just let me know.
Things I’m currently adding:
– List created shipments (to easily go to track & trace, and to download the pdf again)
– Shopify Advanced & Plus only feature: For shopify+ and shopify advanced users I created an unlisted app that let’s your customer select pickup points pakjegemak app
I’m currently working on linking this app with the labels app, so you can also create labels if a customer selected a pickup point.

 

Please note you need a postnl contract to get a production API Key

 

Shopify print PostNL Labels

Because most of the shopify apps that allow PostNL label printing are very large and complicated, with their own dashboard. I wanted to create an app to allow direct printing postnl shipping labels within the shopify admin.

I also added the ability to select multiple orders at once and create labels for them I’m expecting to get the app reviewed within the next week.

Dashboard:
dashboard

Maak Shipment & Label:
create

Pdf Label
label

You will need a postnl developer account to request a developer API key, once you have created some test shipments, you will be able to request a production API key (if you have a postnl contract)

 

 

Shopify PostNL Pakjegemak pickup points

Are You looking for pickup points form your own stores? check out my other app: 
https://apps.shopify.com/product-inventory-information

 

Update

I have added the pickup points to my PostNL app listed in the shopify app store

Shopify Advanced plans and up can use the pickup points option by default.
Shopify Basic & Standard plans need to have a yearly plan with shopify (in order to get access to the required API’s) the yearly plan does give you a 10% discount.

/Update

 

 

I was looking for an easy way to have customers select pickup points during checkout, but unfortunately there is no easy implementation. Sendcloud does offer postnl pickuplocations in shopify, but only after the payment process has finished will the customer get to see a map and select their pickup location. Which seems a bit odd to me, and counterintuitive.

I have created a shipping carrier service, which is currently awaiting review in which you can have the pickup points show up at shipping option selection:

screen

test it out yourself on my demo store, shopify plus: https://shipping-demo.myshopify.com

 

Basic shopify: https://pakjegemak.myshopify.com

 

Unit4 Multivers .netAPI

If you want to synchronize certain products from multivers with another (online) application, you can choose to use Unit4 Multivers .net API or the Unit4 multivers webAPI to make sure you are able to use them with your license, contact your accountmanager first.

I chose to use the .netapi because we didn’t want our multivers server to be directly connected to the internet with the web API. that’s why unit4 would post product update data to the webapplication, and load specific product data from the webapplication to update unit4 as well.

Sitecom WLC-1000 Firmware Information

Unfortunately the company that created the iphone and android application has filed for bankruptcy, rendering the wlc-1000 cameras useless for checking your cameras on the road or recording to the cloud (recording on the sdcard should still work as far as I know).

A visitor asked me to share some of my findings for the sitecom firmware, because he wants to create an app to be able to use the cameras again, which sounds like a great idea!
It has been a while since I did the analysis, but I will try and share as much as I found, so anyone can try and setup a working application. With one side note, please share your projects, or setup a public repository, so other people can help / benefit from the code as well (and share it in the comments below).

Shopify Script, Buy Product from vendor X get Product Y for free

In shopify I was looking for a way to get a free product when buying from a specific vendor, I came up with below script.
In our case we also needed the vendor’s product to be at > $400 for the gift product to be free, you can offcourse remove that if statement.
Unfortunately you can’t add products to the cart with shopify scripts (yet?) so you can leave adding the product up to the customer, or add the product with javascript in the frontend.

You can remove the puts statements, I though I’d leave them so you can see how to debug something like this.

discounted_product = 2228740609
products_seen = false;

puts('loop over all products, and check if we have the required vendor')
Input.cart.line_items.each do |line_item|
  product = line_item.variant.product
  puts(product.vendor.downcase)
  if(product.vendor.downcase == 'vendorname')
    
    if(line_item.variant.price > Money.new(cents: 40000))
      puts('found a product matching vendor, and matching minimum price of $400')
      products_seen = true;
    end
  end
end

if(products_seen)
  puts('Check if the gift product is in the cart, and update its price to 0')
  Input.cart.line_items.each do |line_item|
    product = line_item.variant.product
    next unless product.id == discounted_product
      puts('they will only get 1 free, not unlimited items')
      updated_price = line_item.line_price.cents - (line_item.line_price.cents / line_item.quantity)
      line_item.change_line_price( Money.new(cents: updated_price) , message: "Free Shoetrees")
  end
end

Output.cart = Input.cart