Skip to content

Instantly share code, notes, and snippets.

View shaheer-sadi's full-sized avatar
🎯
Focusing

Shaheer ulHaq shaheer-sadi

🎯
Focusing
View GitHub Profile
param (
[Parameter(Mandatory=$true)]
[string]$TargetFolder
)
# Process all files recursively inside the target folder
Get-ChildItem -Path $TargetFolder -File -Recurse | ForEach-Object {
$inputFile = $_.FullName
$outputFile = [System.IO.Path]::ChangeExtension($inputFile, ".webp")
@shaheer-sadi
shaheer-sadi / fitlers.cs
Last active October 10, 2018 15:47
Create merchello filter groups and filters
var entityCollectionService = MerchelloContext.Current.Services.EntityCollectionService;
var filterGroup = entityCollectionService.CreateEntityCollectionWithKey(EntityType.EntityCollection, Guid.NewGuid(), "Extra");
filterGroup.IsFilter = true;
entityCollectionService.Save(filterGroup);
var filterGroupValue = entityCollectionService.CreateEntityCollection(EntityType.EntityCollection, Guid.NewGuid(), "Featured");
filterGroupValue.IsFilter = true;
filterGroup.ParentKey = filterGroup.Key;
entityCollectionService.Save(filterGroupValue);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" />