Skip to content

Commit 8e5022c

Browse files
committed
Added new Contact page.
1 parent ef286b5 commit 8e5022c

File tree

4 files changed

+134
-1
lines changed

4 files changed

+134
-1
lines changed

config/.env.default

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@ export STORE_NAME='Advanced PHP 7 eCommerce Website'
3535
export STORE_TAGLINE='For all your eCommerce Needs.'
3636
export STORE_CURRENCY='$'
3737

38+
# Company Information
39+
#####################
40+
export COMPANY_NAME=''
41+
export SALES_EMAIL=''
42+
export SALES_TELEPHONE=''
43+
# For WhatsApp, add your WhatsApp telephone number using the international
44+
# dialing code but DO NOT include the + sign. For example, 447245590848 (UK) or
45+
# 15058873345 (USA).
46+
export SALES_WHATSAPP=''
47+
export ADDRESS_LINE_ONE=''
48+
export ADDRESS_LINE_TWO=''
49+
export ADDRESS_SUBURB=''
50+
export ADDRESS_CITY=''
51+
export ADDRESS_STATE=''
52+
export ADDRESS_COUNTRY=''
53+
export ADDRESS_POSTAL_CODE=''
54+
3855
# Database configuration
3956
########################
4057
# export DB_HOST='localhost'

config/.env.prod

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@ export STORE_NAME='Advanced PHP 7 eCommerce Website'
3535
export STORE_TAGLINE='For all your eCommerce Needs.'
3636
export STORE_CURRENCY='$'
3737

38+
# Company Information
39+
#####################
40+
export COMPANY_NAME=''
41+
export SALES_EMAIL=''
42+
export SALES_TELEPHONE=''
43+
# For WhatsApp, add your WhatsApp telephone number using the international
44+
# dialing code but DO NOT include the + sign. For example, 447245590848 (UK) or
45+
# 15058873345 (USA).
46+
export SALES_WHATSAPP=''
47+
export ADDRESS_LINE_ONE=''
48+
export ADDRESS_LINE_TWO=''
49+
export ADDRESS_SUBURB=''
50+
export ADDRESS_CITY=''
51+
export ADDRESS_STATE=''
52+
export ADDRESS_COUNTRY=''
53+
export ADDRESS_POSTAL_CODE=''
54+
3855
# Database configuration
3956
########################
4057
# export DB_HOST='localhost'

contact.php

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?php
2+
/**
3+
* Advanced PHP 7 eCommerce Website (https://22digital.agency)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU Affero General Public License as
7+
* published by the Free Software Foundation, either version 3 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU Affero General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Affero General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*
18+
* @copyright Copyright (c) 22 Digital (https://22digital.agency)
19+
* @copyright Copyright (c) Justin Hartman (https://justinhartman.blog)
20+
* @author Justin Hartman <justin@hartman.me> (https://justinhartman.blog)
21+
* @link https://github.com/justinhartman/complete-php7-ecom-website GitHub Project
22+
* @since 0.3.2
23+
* @license https://opensource.org/licenses/AGPL-3.0 AGPL-3.0
24+
*/
25+
26+
/**
27+
* Load the bootstrap file.
28+
*/
29+
require __DIR__ . '/config/bootstrap.php';
30+
31+
/**
32+
* Load the template files.
33+
*/
34+
include INC . 'header.php';
35+
include INC . 'nav.php';
36+
?>
37+
38+
39+
<!-- SHOP CONTENT -->
40+
<section id="content">
41+
<div class="content-blog">
42+
<div class="container">
43+
<div class="row">
44+
<div class="page_header text-center">
45+
<h2>Contact Us</h2>
46+
<p>You can contact us via any of the methods below.</p>
47+
</div>
48+
<div class="col-sm-12 col-md-6">
49+
<div class="row">
50+
<h2>Support Options</h2>
51+
<hr>
52+
<div class="col-sm-6">
53+
<h4>Email:</h4>
54+
<br>
55+
<h4>Phone:</h4>
56+
<br>
57+
<h4>WhatsApp:</h4>
58+
<br>
59+
</div>
60+
<div class="col-sm-6">
61+
<h4><a href="mailto:<?php echo getenv('SALES_EMAIL', null); ?>?subject=Website+Enquiry"><?php echo getenv('SALES_EMAIL', null); ?></a></h4>
62+
<br>
63+
<h4><a href="tel:<?php echo getenv('SALES_TELEPHONE', null); ?>"><?php echo getenv('SALES_TELEPHONE', null); ?></a></h4>
64+
<br>
65+
<h4><a href="https://api.whatsapp.com/send?phone=<?php echo getenv('SALES_WHATSAPP', null); ?>"><?php echo getenv('SALES_WHATSAPP', null); ?></a></h4>
66+
<br>
67+
</div>
68+
</div>
69+
<div class="clearfix space20"></div>
70+
<div class="row">
71+
<h2>Our Address Details</h2>
72+
<hr>
73+
<div class="col-sm-12">
74+
<h3><?php echo getenv('COMPANY_NAME', null); ?></h3>
75+
<br>
76+
<p><?php echo getenv('ADDRESS_LINE_ONE', null); ?></p>
77+
<p><?php echo getenv('ADDRESS_LINE_TWO', null); ?></p>
78+
<p><?php echo getenv('ADDRESS_SUBURB', null); ?></p>
79+
<p><?php echo getenv('ADDRESS_CITY', null); ?></p>
80+
<p><?php echo getenv('ADDRESS_STATE', null); ?></p>
81+
<p><?php echo getenv('ADDRESS_COUNTRY', null); ?></p>
82+
<p><?php echo getenv('ADDRESS_POSTAL_CODE', null); ?></p>
83+
</div>
84+
</div>
85+
</div>
86+
<div class="col-sm-12 col-md-6">
87+
<h2>Come Visit Us</h2>
88+
<hr>
89+
<div id="map-pop"></div>
90+
</div>
91+
</div>
92+
</div>
93+
</div>
94+
</section>
95+
96+
<script async defer src="https://maps.googleapis.com/maps/api/js?key=<?php echo getenv('GOOGLE_MAPS_API_KEY', null); ?>&v=quarterly&callback=initMap" type="text/javascript"></script>
97+
<script src="<?php echo getenv('STORE_URL'); ?>/assets/js/gmap.js"></script>
98+
99+
<?php include INC . 'footer.php'; ?>

inc/nav.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
</ul>
4040
</li>
4141
<li>
42-
<a href="#">Contact</a>
42+
<a href="<?php echo getenv('STORE_URL'); ?>/contact.php">Contact</a>
4343
</li>
4444
</ul>
4545
<div class="header-xtra">

0 commit comments

Comments
 (0)