PFC is a modular set of Shopify Liquid snippets, vanilla JavaScript, and CSS for building product-focused Shopify experiences without external dependencies.
It is designed for products sold by unit, m², package, or set and supports advanced pricing logic, calculators, and structured product data.
Most Shopify themes handle products in a generic way.
PFC adds reusable, performance-friendly components that can be integrated into any theme and configured entirely via product and variant metafields.
It is especially useful for complex products such as flooring, tiles, building materials, and technical goods.
- Package / m² calculator with waste %, totals, and optional currency conversion
- Product gallery with thumbnails, zoom, and badge support
- Metafields-driven specifications (desktop and mobile layouts)
- Sample flow with links and popup box
- Upsell slider driven entirely by metafields
- No external libraries or Shopify apps required
- Shopify developers building custom product templates
- Shopify agencies creating reusable component systems
- Technical product owners in e-commerce
- Stores that require precise unit-based pricing logic
- Calculator with package sizing, waste option, totals, and optional EUR conversion
- Product gallery with zoom, navigation, thumbnails, and badges
- Desktop and mobile metafields display with automatic specification lists
- Sample link with optional banner and popup flow
- Upsell products slider driven by product or collection metafields
-
assets/product-cards.js
EUR conversion and price display logic for product cards -
assets/product-cards.css
Base styles for product cards and grid layout
-
snippets/pfc-accordion.liquid
Accordion container with filtering logic -
snippets/pfc-accordion-item.liquid
Single accordion item rendering -
snippets/pfc-calculator.liquid
Calculator UI, package logic, and CTAs -
snippets/pfc-calculator-pricing.liquid
Unit and package pricing display -
snippets/pfc-calculator-totals.liquid
Total pricing and savings output -
snippets/pfc-collection-card.liquid
Product card for collections and upsell sliders -
snippets/pfc-gallery.liquid
Main gallery image area and controls -
snippets/pfc-gallery-actions.liquid
Gallery action buttons (sample / virtual) -
snippets/pfc-gallery-thumbs.liquid
Thumbnail strip and navigation -
snippets/pfc-gallery-zoom.liquid
Zoom modal markup -
snippets/pfc-metafields-desktop.liquid
Metafields display for desktop -
snippets/pfc-metafields-mobile.liquid
Metafields display for mobile -
snippets/pfc-sample-box.liquid
Sample banner and popup UI -
snippets/pfc-sample-link.liquid
Sample link logic and output -
snippets/pfc-upsell-slider.liquid
Upsell products slider
- Copy the
assets/andsnippets/folders into your Shopify theme. - Include the assets in your theme:
- Add
product-cards.cssto your main CSS bundle - Add
product-cards.jsbefore</body>or via section assets
- Add
- Ensure your product template or section renders:
pfc-gallerypfc-calculatorpfc-metafields-*pfc-sample-*pfc-upsell-slider(optional)
- Configure metafields and section settings as described below.
All metafields are optional unless your design or logic depends on them.
calculator_package_sizecalculator_waste_percentcalculator_default_quantitycalculator_quantity_stepcalculator_min_quantitycalculator_unit_labelpromo_productpromo_titlepromo_quantitypromo_button_labelcategory_titlecategory_linkcategory_button_labelsample_black_banner
key_featuresfree_samplecompare_enabledbevelwaterprooffloor_heatinguv_resistantplank_widthplank_lengthm2_per_packmanufacturersurfaceintegrated_underlayclasswear_layerthickness
titlecollectionproducts
custom.calculator_package_size
Used when package size differs per variant
Common section settings used across PFC components:
cta_labelsold_out_labelquantity_labelpackage_labelwaste_labelwaste_infosaved_label
package_sizewaste_percentdefault_quantityquantity_stepmin_quantityunit_label
show_savings_badgeshow_package_calculationshow_package_detailsshow_waste_optionshow_request_offer
image_badge_textplaceholder_imageshow_sample_buttonshow_virtual_button
show_metafieldsauto_show_all_metafieldsshow_empty_metafieldsempty_metafield_text
enable_currency_conversionshow_eur_alongside_bgneur_to_bgn_rate
MIT License
This project is released under the MIT License.
You are free to use, modify, and distribute the code, including for commercial projects, as long as the original copyright notice is retained.