This repository was archived by the owner on Jan 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·73 lines (46 loc) · 2.07 KB
/
index.php
File metadata and controls
executable file
·73 lines (46 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
if( strpos($_SERVER['HTTP_HOST'], '.dev') !== false) {
$baseUrl = 'http://localhost:4200';
} else {
$baseUrl = 'http://mullinschaindrive.com/staging';
}
?>
<?php include('components/header.php'); ?>
<?php
$menu = '<div class="main-menu"><div class="menu-toggle"><i class="fa fa-bars"></i></div><ul class="menu-list">';
require('bigcartel.class.php');
require('functions.php');
$BG = new BigCartel;
$BG->setStore('mullinschaindrive');
$storeInfo = $BG->getStoreInfo();
// var_dump($storeInfo);
// echo '<br />';
// echo '<br />';
// echo '<br />';
// echo '<br />';
// echo '<br />';
$products = $BG->listProducts();
// var_dump($products);
$html = '<section class="content">';
foreach($products as $product) {
$name = str_replace('Mullins', '', $product->name);
if(strpos(strtolower($name), 'shirt') !== false || strpos(strtolower($name), 'poster') !== false) {
} else {
$menu .= '<li class="menu-item"><a href="#'.toCamelCase($name).'">'.$name.'</a></li>';
$html .= '<section class="product" id="'.toCamelCase($name).'">';
$html .= '<h3 class="product-name">'.$name.'<a class="purchase-link" target="_blank" href="'.$storeInfo->url.''.$product->url.'">$'.$product->default_price.' <i class="fa fa-shopping-cart"></i></a></h3>';
$html .= '<p class="product-description">'.utf8_decode($product->description).'</p>';
foreach($product->images as $image) {
$html .= '<img src="'.$image->url.'" />';
}
$html .= '</section>';
}
}
$html .='</section>';
$menu .= '<li class="after"><div class="inner"></div></li></ul>';
$menu .= '<span class="contact-info">Mullins Chain Drive<br/>401 1st Street #155</br>Richmond, California 94801</br></br><a href="mailto:info@mullinschaindrive.com">info@mullinschaindrive.com</a></span>';
$menu .= '<div class="social"><a href="http://facebook.com/mullinschaindrive" target="_blank"><i class="fa fa-facebook"></i></a><a href="http://instagram.com/mullinschaindrive" target="_blank"><i class="fa fa-instagram"></i></a>';
$menu .= '</div>';
echo $html;
?>
<?php include('components/footer.php'); ?>