Skip to content

Instantly share code, notes, and snippets.

@skttl
skttl / include-ucommerce-bins.xml
Last active March 30, 2016 06:13
Include ucommerce bins in csproj on build
<!-- add the following to csproj file -->
<Content Include="bin\ucommerce\**">
<Link>ucommerce\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@skttl
skttl / hideEmptyBaskets.js
Created March 11, 2016 12:52
Hide empty baskets in ucommerce backend
/*
Go to uCommerce > Orders > Search.
In the console, choose right(search.aspx) as the target, and run the following code.
*/
$("#orderTable tbody tr").each(function() {
if ($(this).children("td:last-child").text() == "0" || $(this).children("td:last-child").text() == "0,00") {
@skttl
skttl / GetFieldValue.cs
Created March 2, 2016 09:41
Extension method for getting field value from Examine.SearchResult, with string fallback
using Examine;
namespace MyNamespace
{
public static class ExamineExtensions
{
public static string GetFieldValue(this SearchResult searchResult, string key, string fallback = "")
{
if (searchResult.Fields.Keys.Contains(key))
{