Add package dimensions for shipping calculation
- Add length, width, and height fields to product blueprint (in centimeters) - Add corresponding data-item attributes for Snipcart shipping calculation - Enable volume-based shipping cost calculation 🤖 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
2d66529c9a
commit
f7a69482fc
2 changed files with 42 additions and 0 deletions
|
|
@ -47,6 +47,9 @@
|
|||
data-item-name="<?= $page->title()->html() ?>"
|
||||
data-item-shippable="true"
|
||||
data-item-weight="<?= $page->weight()->or(0) ?>"
|
||||
data-item-length="<?= $page->length()->or(0) ?>"
|
||||
data-item-width="<?= $page->width()->or(0) ?>"
|
||||
data-item-height="<?= $page->height()->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