Redesign logo & storefront, light subtle admin theme, and 3D print cost calculator

This commit is contained in:
2026-11-01 21:23:53 +01:00
parent 0c95c7d120
commit e0592212e1
18 changed files with 1887 additions and 1153 deletions
+7 -12
View File
@@ -653,19 +653,14 @@ class MakerWorldService
$dimensions = is_array($design['dimensions']) ? implode(' x ', $design['dimensions']) : (string) $design['dimensions'];
}
// Calculate a smart suggested retail price
// Base starting price of 9.95, + ~0.08 per gram + 1.25 per print hour
$suggestedPrice = 14.95;
if ($weightGrams || $printTimeHours) {
$cost = 5.0;
if ($weightGrams) {
$cost += ($weightGrams * 0.07);
}
if ($printTimeHours) {
$cost += ($printTimeHours * 1.50);
}
$suggestedPrice = round(max(9.95, $cost * 1.6), 2);
// Calculate a smart suggested retail price using the 3D Printing Cost Calculator
$colorCount = 1;
if (! empty($profile['filaments']) && is_array($profile['filaments'])) {
$colorCount = max(1, min(4, count($profile['filaments'])));
}
$calculator = app(PriceCalculatorService::class);
$calcResult = $calculator->calculate($weightGrams ?: 85, $printTimeHours ?: 4.0, $colorCount);
$suggestedPrice = $calcResult['suggested_price'];
// Creator and MakerWorld URL
$authorName = $design['designCreator']['name'] ?? $design['designCreator']['handle'] ?? 'MakerWorld Creator';