Ejemplo n.º 1
0
 public function beforeAction($action)
 {
     $storeName = Property::getPropertyValue('store_name', '');
     Yii::$app->view->title = Property::getPropertyValue('store_title', $storeName);
     Yii::$app->view->registerMetaTag(['name' => 'description', 'content' => Property::getPropertyValue('store_description', $storeName)], 'description');
     Yii::$app->view->registerMetaTag(['name' => 'keywords', 'content' => Property::getPropertyValue('store_keywords', $storeName)], 'keywords');
     return parent::beforeAction($action);
 }
Ejemplo n.º 2
0
 /**
  * AuthorizeNetCIM constructor.
  */
 public function __construct()
 {
     $this->loginName = Property::getPropertyValue('authorize_login');
     $this->transactionKey = Property::getPropertyValue('authorize_key');
     if (Property::getPropertyValue('authorize_live', 'no') == 'yes') {
         $this->apiHost = 'api.authorize.net';
         $this->apiMode = 'liveMode';
     }
 }
Ejemplo n.º 3
0
 public function generateEmailForgotPassword()
 {
     if (!empty($emailTo = $this->email)) {
         $mail = new Mail();
         $mail->to = $emailTo;
         $mail->subject = Yii::t('app', 'Information from {store_name}', ['store_name' => Property::getPropertyValue('store_name', '')]);
         $mail->body = StoreUtils::renderView('//mail/_destination_forgot_password', ['model' => $this]);
         $mail->save();
     }
 }
Ejemplo n.º 4
0
 /**
  * Sends an email to the specified email address using the information collected by this model.
  * @param  string  $email the target email address
  * @return boolean whether the model passes validation
  */
 public function contact($email)
 {
     if ($this->validate()) {
         $mail = new Mail();
         $mail->subject = Yii::t('app', 'Comment received on {store}', ['store' => Property::getPropertyValue('store_name', '')]);
         $mail->body = StoreUtils::renderView('//mail/_comment', ['model' => $this]);
         $mail->to = $email;
         $mail->save();
         return true;
     }
     return false;
 }
Ejemplo n.º 5
0
    <?php 
echo Html::textInput('properties[authorize_key]', Property::getPropertyValue('authorize_key', ''), ['class' => 'form-control']);
?>
    <label>Access Login</label>
    <?php 
echo Html::textInput('properties[authorize_login]', Property::getPropertyValue('authorize_login', ''), ['class' => 'form-control']);
?>
    <label>Status</label>
    <?php 
echo Html::dropDownList('properties[authorize_live]', Property::getPropertyValue('authorize_live', ''), ['no' => 'Test Mode', 'yes' => 'Live Mode'], ['class' => 'form-control']);
?>
</div>

<h3>Social Sites</h3>
<div>
    <label>Facebook</label>
    <?php 
echo Html::textInput('properties[facebook_link]', Property::getPropertyValue('facebook_link', ''), ['class' => 'form-control']);
?>
    <label>Twitter</label>
    <?php 
echo Html::textInput('properties[twitter_link]', Property::getPropertyValue('twitter_link', ''), ['class' => 'form-control']);
?>
</div>

<div style="margin-top: 10px;">
    <button class="btn btn-lg btn-primary " type="submit">Save</button>
</div>

<?php 
ActiveForm::end();
Ejemplo n.º 6
0
<?php

/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
$provider = Yii::$app->session->get('provider', null);
if (!$provider instanceof \app\models\Provider) {
    $provider = null;
}
$storeName = \app\models\Property::getPropertyValue('store_name', '');
if (!is_null($provider)) {
    $menu = [['label' => 'Home', 'url' => ['/provider/default']], ['label' => 'Products', 'url' => ['/provider/product']], ['label' => 'Orders', 'url' => ['/provider/order']], ['label' => 'Profile', 'url' => ['/provider/default/profile']], ['label' => 'Logout (' . $provider->email . ')', 'url' => ['/provider/default/logout'], 'linkOptions' => ['data-method' => 'post']]];
} else {
    $menu = [['label' => 'Home', 'url' => ['/provider/default/index']], ['label' => 'Login', 'url' => ['/provider/default/login']]];
}
AppAsset::register($this);
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php 
echo Yii::$app->language;
?>
">
<head>
    <meta charset="<?php 
echo Yii::$app->charset;
?>
Ejemplo n.º 7
0
<?php

/** @var $model User */
use app\models\Property;
use app\models\User;
use yii\helpers\Url;
$storeName = Property::getPropertyValue('store_name', '');
$url = Url::to(['site/index'], true);
echo $this->render('_top');
?>

<h1>Bienvenido a <?php 
echo $storeName;
?>
</h1>

    <table style="margin-top: 20px;">
        <tr>
            <td>
                <p>Sus credenciales para acceder a nuestro sitio son:</p>
                <div style="display: inline-block;padding: 20px;background-color: #cae4fb;">
                    <table style="width: auto;">
                        <tr>
                            <td style="padding: 6px 12px;text-align: right;"><?php 
echo Yii::t('app', 'Email address');
?>
</td>
                            <td style="padding: 6px 12px;background-color: #ffffff;font-weight: bold;font-family: monospace;"><?php 
echo $user->username;
?>
</td>
Ejemplo n.º 8
0
<?php

/* @var $this yii\web\View */
use app\components\StoreUtils;
$ids = StoreUtils::getProductIds(9);
$this->title = \app\models\Property::getPropertyValue('store_name', '');
?>
<div class="site-index">

    <div>
        <?php 
echo $this->render('//parts/_banner', ['zone' => 'home_top']);
?>
    </div>

    <div class="row" style="margin-top: 10px;">

        <div class="col-md-3">
            <?php 
echo $this->render('//layouts/_column_left');
?>
        </div>

        <div class="col-md-6">
            <?php 
echo $this->render('//parts/_products', ['ids' => $ids, 'template' => '_product_home', 'columns' => 3]);
?>
        </div>

        <div class="col-md-3">
            <div class="column_right">
Ejemplo n.º 9
0
<?php

use app\models\Property;
use yii\bootstrap\Html;
use yii\helpers\Url;
$list = ['col1' => [['label' => Yii::t('app', 'About Us'), 'url' => ['site/page', 'code' => 'quienes-somos']], ['label' => Yii::t('app', 'Payment methods'), 'url' => ['site/page', 'code' => 'metodos-de-pago']], ['label' => Yii::t('app', 'Contact Us'), 'url' => ['site/contact']]], 'col2' => [['label' => Yii::t('app', 'My Profile'), 'url' => ['user/profile']], ['label' => Yii::t('app', 'My Orders'), 'url' => ['user/orders']], ['label' => Yii::t('app', 'Shopping Cart'), 'url' => ['shopcart/index']]], 'col3' => [['label' => Yii::t('app', 'Terms and conditions'), 'url' => ['site/page', 'code' => 'terminos-y-condiciones']], ['label' => Yii::t('app', 'How to buy'), 'url' => ['site/page', 'code' => 'how-to-buy']], ['label' => Yii::t('app', 'Send your comments'), 'url' => ['site/comment']]]];
$facebook = Property::getPropertyValue('facebook_link', '#');
$twitter = Property::getPropertyValue('twitter_link', '');
$showSocial = strlen($facebook . $twitter) > 0;
?>

<footer class="footer">
    <div class="container">
        <div class="row">
            <div class="col-md-1 col-xs-4" style="margin-bottom: 20px;text-align: center">
                <!-- (c) 2005, 2015. Authorize.Net is a registered trademark of CyberSource Corporation -->
                <div class="AuthorizeNetSeal" style="display: inline-block!important;">
                    <script type="text/javascript" language="javascript">var ANS_customer_id = "9822f86e-447f-40f5-a96a-3386ed5544f8";</script>
                    <script type="text/javascript" language="javascript" src="//verify.authorize.net/anetseal/seal.js"></script>
                    <a href="http://www.authorize.net/" id="AuthorizeNetText" target="_blank">Online Payment Service</a></div>
            </div>
            <div class="col-md-3 col-xs-8">
                <div class="footer_left" style="text-align: center">
                    <?php 
if ($showSocial) {
    ?>
                        <div class="social-links">
                            <span><?php 
    echo Yii::t('app', 'Share in');
    ?>
</span>
Ejemplo n.º 10
0
<?php

use app\models\Nicaragua;
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $model app\models\RegisterForm */
/* @var $form ActiveForm */
/* @var $back string */
$storeName = \app\models\Property::getPropertyValue('store_name', 'RecibiloAlla');
?>
<div class="site-register">

    <h2><?php 
echo Yii::t('app', 'Register Your Information');
?>
</h2>

    <?php 
$form = ActiveForm::begin(['layout' => 'horizontal', 'id' => 'formRegister', 'options' => ['onSubmit' => "if (\$('#cbAgree').is(':checked')) { \$('#cbAgreeMsg').hide();return true; } else { \$('#cbAgreeMsg').show();return false; }"]]);
?>
    <?php 
echo Html::activeHiddenInput($model, 'shipping_country');
?>
    <?php 
echo Html::hiddenInput('back', $back);
?>

    <div class="row form">
        <div class="col-lg-6">