Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue caused by UTF-8 characters in image URLs.
Added some styling to the view page (still incomplete). Fixed sorting order for history results. Format prices to two decimal places. Passing the site name to the view. No longer handling exceptions silently (accident). Now handling and throwing again.
- Loading branch information
1 parent
5ad2401
commit 2e16274
Showing
13 changed files
with
280 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,60 @@ | ||
<?php var_dump($this->productData); ?> | ||
<div id="outer-container"> | ||
<?php //var_dump($this->productData); ?> | ||
<div id="product-container"> | ||
<div id="image"> | ||
<img alt="<?php echo str_replace('"','”',$this->productData['title']); ?>" src="/images/products/<?php echo $this->productData['id'] ?><?php echo $this->productData['file_extension']; ?>" /> | ||
</div> | ||
<div id="title"> | ||
<?php echo $this->productData['title']; ?> | ||
</div> | ||
<div id="price"> | ||
$<?php echo $this->productData['price']; ?> | ||
</div> | ||
<div id="shipping"> | ||
+ $<?php echo $this->productData['shipping']; ?> shipping | ||
</div> | ||
<div id="condition"> | ||
Condition: <?php echo $this->productData['condition']; ?> | ||
</div> | ||
<div id="product"> | ||
Product: | ||
<ul> | ||
<?php foreach($this->productData['products'] as $product): ?> | ||
<li><?php echo $product['quantity']; ?> <?php echo $product['name']; ?></li> | ||
<?php endforeach; ?> | ||
</ul> | ||
</div> | ||
<div id="buy-link"> | ||
<?php $current = end($this->productData['history']); ?> | ||
<?php if(!$current['sold_out'] && $current['percent_sold'] < .9): ?> | ||
<a href="<?php echo $this->productData['purchase_url']; ?>">I want one!</a> | ||
<?php elseif(!$current['sold_out'] && $current['percent_sold'] >= .9): ?> | ||
<a href="<?php echo $this->productData['purchase_url']; ?>">I want one! (they're almost gone!)</a> | ||
<?php else: ?> | ||
Sold out! | ||
<?php endif; ?> | ||
</div> | ||
<div id="comment-container"> | ||
<?php echo $current['comments']; ?> comment(s) | ||
</div> | ||
<div id="subtitle"> | ||
<?php echo $this->productData['subtitle']; ?> | ||
</div> | ||
<div id="teaser"> | ||
<?php echo $this->productData['teaser']; ?> | ||
</div> | ||
</div> | ||
<img alt="<?php echo str_replace('"','"e;',$this->productData['title']); ?>" src="/images/products/<?php echo $this->productData['id'] ?><?php echo $this->productData['file_extension']; ?>" /> | ||
</div> | ||
<div id="product-info"> | ||
<div id="title"> | ||
<?php echo $this->productData['title']; ?> | ||
</div> | ||
<div id="price"> | ||
$<?php echo $this->productData['price']; ?> | ||
</div> | ||
<div id="shipping"> | ||
+ $<?php echo $this->productData['shipping']; ?> shipping | ||
</div> | ||
<div id="condition"> | ||
<dl> | ||
<dt>Condition:</dt> | ||
<dd> | ||
<?php echo $this->productData['condition']; ?> | ||
</dd> | ||
</dl> | ||
</div> | ||
<div id="product"> | ||
<dl> | ||
<dt>Product:</dt> | ||
<?php foreach($this->productData['products'] as $product): ?> | ||
<dd> | ||
<?php echo $product['quantity']; ?> <?php echo $product['name']; ?> | ||
</dd> | ||
<?php endforeach; ?> | ||
</dl> | ||
<div class="clearfix"></div> | ||
</div> | ||
<div id="buy-link"> | ||
<?php $current = end($this->productData['history']); ?> | ||
<?php if(!$current['sold_out'] && $current['percent_sold'] < .9): ?> | ||
<a href="<?php echo $this->productData['purchase_url']; ?>">I want one!</a> | ||
<?php elseif(!$current['sold_out'] && $current['percent_sold'] >= .9): ?> | ||
<a href="<?php echo $this->productData['purchase_url']; ?>">I want one! (they're almost gone!)</a> | ||
<?php else: ?> | ||
Sold out! | ||
<?php endif; ?> | ||
</div> | ||
<div id="comment-container"> | ||
<?php echo $current['comments']; ?> comment(s) | ||
</div> | ||
</div> | ||
<div class="clearfix"> | ||
<div class="triangle"></div> | ||
</div> | ||
</div> | ||
<?php $this->placeholder('secondary')->set( | ||
'<div id="subtitle">'. | ||
str_replace("'",''',$this->productData["subtitle"]) . | ||
'</div> | ||
<div id="teaser">' . | ||
str_replace("'", ''', $this->productData["teaser"]) . | ||
'</div>' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
.triangle { | ||
height: 0; | ||
width: 0; | ||
border-width: 25px 37px; | ||
border-color: #FFF transparent transparent transparent; | ||
border-style: solid; | ||
position: absolute; | ||
left: 115px; | ||
} | ||
|
||
#logo { | ||
width: 811px; | ||
margin: 0 auto; | ||
border-width: 0 0 5px 0; | ||
border-color: #E2E2E2; | ||
border-style: solid; | ||
font-size: 30px; | ||
font-weight: bold; | ||
} | ||
|
||
#main-wrapper { | ||
background-color: #FFF; | ||
} | ||
|
||
#product-container { | ||
margin: 0 auto; | ||
width: 811px; | ||
} | ||
|
||
#secondary-wrapper { | ||
background-color: rgba(255,255,255,.4); | ||
border-radius: 5px; | ||
-moz-border-radius: 5px; | ||
-webkit-border-radius: 5px; | ||
/* For IE 7*/ | ||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#66FFFFFF, endColorstr=#66FFFFFF); | ||
/* For IE 8*/ | ||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#66FFFFFF, endColorstr=#66FFFFFF)"; | ||
padding: 15px 15px 15px 15px; | ||
margin: 17px auto; | ||
width: 781px; | ||
} | ||
|
||
body { | ||
font-family: "Trebuchet MS",Trebuchet,Calibri,Tahoma,Arial,sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#image, #product-info { | ||
float: left; | ||
} | ||
|
||
#image { | ||
width: 456px; | ||
} | ||
|
||
#product-info { | ||
width: 355px; | ||
} | ||
|
||
.clearfix { | ||
clear: both; | ||
width: 100%; | ||
position: relative; | ||
} | ||
|
||
#subtitle { | ||
font-size: 16px; | ||
font-weight: bold; | ||
text-transform: uppercase; | ||
margin: 5px 0; | ||
} | ||
|
||
#teaser { | ||
color: #FFF; | ||
font-size: 22px; | ||
margin-top: 10px; | ||
} | ||
|
||
#title { | ||
font-size: 20px; | ||
padding: 6px 5px 5px 0px; | ||
} | ||
|
||
#price { | ||
font-weight: bold; | ||
font-size: 22px; | ||
float: left; | ||
margin-bottom: 4px; | ||
} | ||
|
||
#shipping { | ||
font-size: 11px; | ||
margin: 8px 0 0 30px; | ||
float: left; | ||
} | ||
|
||
#condition, #product { | ||
clear: both; | ||
font-size: 11px; | ||
} | ||
|
||
#condition dd, #product dd { | ||
margin-left: 90px; | ||
margin-bottom: 5px; | ||
float: left; | ||
width: 250px; | ||
} | ||
|
||
#condition dt, #product dt { | ||
width: 80px; | ||
float: left; | ||
padding: 0 0 5px 0; | ||
position: absolute; | ||
} | ||
|
||
#condition dt, #product dt { | ||
color: #999; | ||
text-transform: uppercase; | ||
font-size: 12px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
body { | ||
background-color: #EFEAE6; | ||
} | ||
|
||
#secondary-wrapper { | ||
background-color: #EFEAE6; | ||
/* For IE 7*/ | ||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFEFEAE6, endColorstr=#FFEFEAE6); | ||
/* For IE 8*/ | ||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFEFEAE6, endColorstr=#FFEFEAE6)"; | ||
} | ||
|
||
#logo, #teaser { | ||
color: #D35500; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
body { | ||
background-color: #FFE086; | ||
} | ||
|
||
#secondary-wrapper { | ||
background-color: #E19433; | ||
/* For IE 7*/ | ||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFE19433, endColorstr=#FFE19433); | ||
/* For IE 8*/ | ||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFE19433F, endColorstr=#FFE19433)"; | ||
} | ||
|
||
#logo { | ||
color: #E19433; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
body { | ||
background-color: #61861E; | ||
} | ||
|
||
#logo { | ||
color: #61861E; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
body { | ||
background-color: #4B437D; | ||
} | ||
|
||
#logo { | ||
color: #4B437D; | ||
} |
Oops, something went wrong.