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
<?php | |
// ... | |
/** | |
* Save handler | |
* | |
* @param array $data | |
* @param Form $form | |
* @return HTTPResponse |
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
<?php | |
namespace Sitelease\PaypalAutoSeller\Extensions; | |
use SilverStripe\ORM\DataExtension; | |
use SilverStripe\ORM\ArrayList; | |
use SilverStripe\View\ArrayData; | |
use Sitelease\PaypalAutoSeller\Model\PrivateProduct; |
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
<?php | |
class Person { | |
protected $name; | |
protected $age; | |
public function __construct($name, $age){ | |
$this->name = $name; | |
$this->age = $age; |
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
<?php | |
//... | |
public static function generateUniqueID($uniqueID) | |
{ | |
// Get the products ID and ID length and store them | |
$prefix = $uniqueID."-"; | |
$prefixLength = strlen($prefix); | |
// Generate a unique identifier approximatly 23 characters long | |
// and remove any periods | |
$identifier = uniqid("", true); |
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
<?php | |
... | |
$download = $request->getVar("download") ? true : false; | |
if ($download) { | |
// Get the the product file path,name,type, and size | |
$productFile = $product->FullUpload()->getAbsoluteURL(); | |
$productFileName = $product->FullUpload()->getFilename(); | |
$productFileType = $product->FullUpload()->getMimeType(); | |
$productFileSize = $product->FullUpload()->getAbsoluteSize(); | |
// Update the HTTPResponse object with the proper download headers |
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
// Baseline Settings | |
$baseline: 7px; | |
$baseline-x2: $baseline * 2; | |
$baseline-x3: $baseline * 3; | |
$baseline-x4: $baseline * 4; | |
$baseline-x5: $baseline * 5; | |
$baseline-x6: $baseline * 6; | |
$baseline-x7: $baseline * 7; | |
$baseline-x8: $baseline * 8; |
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
.c-card { | |
padding: $baseline-x5; | |
background: rgba($color-white, 0.8); | |
border-radius: 2px; | |
box-shadow: 0 1px 2px 0 rgba(28,45,157,0.28); | |
} | |
.c-card--light { | |
background-color: rgba($color-white, 0.5); | |
} |
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
<!-- ... --> | |
<!-- Header --> | |
<header class="u-bgcolor-purple u-color-white u-p-x3"> | |
<div class="o-container o-container--size-small"> | |
<div class="o-media o-media--middle o-media--res"> | |
<div class="o-media__fixed u-text-left u-text-center@sm"> | |
<img src="svg/logo.svg" alt="Logo" class="logo"> | |
</div> | |
<div class="o-media__fluid u-text-center u-text-right@sm"> | |
<nav> |
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
.c-link{ | |
text-decoration: none; | |
color:inherit; | |
} | |
.c-link:hover{ | |
opacity: 0.8; | |
} |