Add shipping weight support for Snipcart delivery calculation
All checks were successful
Deploy / Deploy to Production (push) Successful in 16s
All checks were successful
Deploy / Deploy to Production (push) Successful in 16s
- Add weight field to product blueprint (in grams) - Add data-item-shippable and data-item-weight attributes to product template - Enable Snipcart to calculate shipping costs based on product weight 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
ee5eed49e6
commit
2d66529c9a
2 changed files with 14 additions and 0 deletions
|
|
@ -45,6 +45,8 @@
|
|||
data-item-description="<?= $page->description()->excerpt(100) ?>"
|
||||
data-item-image="<?= $page->images()->first() ? $page->images()->first()->url() : '' ?>"
|
||||
data-item-name="<?= $page->title()->html() ?>"
|
||||
data-item-shippable="true"
|
||||
data-item-weight="<?= $page->weight()->or(0) ?>"
|
||||
<?php
|
||||
if($page->hasOptions()->toBool() && $page->optionValues()->isNotEmpty()):
|
||||
$values = $page->optionValues()->split(',');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue