Skip to content

Commit 1285ed9

Browse files
Merge branch 'develop' of https://github.com/untrobotics/website into develop
2 parents 5cc9d5f + 4a89452 commit 1285ed9

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

merch/product.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@
6363
$back_file = $selected_variant->get_file_by_type(PrintfulVariantFilesTypes::BACK);
6464

6565
head("Buy {$product->get_name()}", true);
66+
$category_name = strtolower(preg_replace('@^.*\(([^()]+)\)$@i', '$1', $product->get_name()));
67+
if($category_name !== 'gear' && $category_name[-1]!=='s'){
68+
$category_name .= 's';
69+
}
70+
6671
} else {
6772
head("Invalid Product", true);
6873
}
@@ -98,8 +103,8 @@ function get_variant_variant($variant_name) {
98103
width: 100%;
99104
}
100105
.merch-section h6 {
101-
border-bottom: 1px solid #a7a7a7;
102-
margin-bottom: 5px;
106+
border-bottom: 1px solid #a7a7a7;
107+
margin-bottom: 5px;
103108
}
104109
.product-price {
105110
color: red;
@@ -125,9 +130,9 @@ function get_variant_variant($variant_name) {
125130
}
126131
.variant-btn-container {
127132
display: block;
128-
height: 50px;
129-
width: 100px;
130-
position: relative;
133+
height: 50px;
134+
width: 100px;
135+
position: relative;
131136
}
132137
.variant-btn {
133138
border: 1px solid #d8d8d8;
@@ -159,9 +164,9 @@ function get_variant_variant($variant_name) {
159164
<ul class="list-breadcrumb">
160165
<li><a href="/">Home</a></li>
161166
<li><a href="/merch">Merch</a></li>
162-
<?php if ($product_can_be_handled) { ?>
163-
<li><a href="/merch/<?php echo strtolower($catalog_product->get_type_name()).'s'; ?>"><?php echo $catalog_product->get_type_name(); ?>s</a></li>
164-
<?php } ?>
167+
<?php if ($product_can_be_handled) { ?>
168+
<li><a href="/merch/<?php echo $category_name; ?>"><?php echo $category_name; ?></a></li>
169+
<?php } ?>
165170
<li>Product</li>
166171
</ul>
167172
</div>
@@ -320,7 +325,7 @@ class="btn variant-btn"
320325
//echo $button['btn'];
321326
$button = $payment_button->get_button();
322327
if ($button->error === false) {
323-
echo "button success";
328+
echo "button success";
324329
echo $payment_button->get_button()->button;
325330
} else {
326331
// TODO: Alert

sql/migrations/urw-64.sql

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,4 @@ MODIFY name char(128) NOT NULL;
77
ALTER TABLE ftpusers
88
MODIFY passwd char(128) NOT NULL;
99

10-
11-
12-
13-
10+
CREATE TABLE ftpinvites (id int primary key auto_increment, email varchar(255), registration_token varchar(16));

0 commit comments

Comments
 (0)