コード例 #1
0
ファイル: LanguageView.php プロジェクト: audef1/myShop
 public function render()
 {
     //set locale acoording to model input
     if ($this->model !== null) {
         $locale = $this->model->__get('lang');
         $_COOKIE['locale'] = $locale;
         //reload header-menu
         echo "<script>\n                    \$(function() {\n                        \$('.top-nav').html(\"" . get_top_menu() . "\");\n                    });\n                </script>";
         $langs = "<li role='presentation' class='dropdown'><a class='dropdown-toggle' data-toggle='dropdown' href='#' role='button' aria-haspopup='true' aria-expanded='false'><img src='/myshop/images/flags/" . $_COOKIE['locale'] . ".png' /></a><ul class='dropdown-menu'>";
         foreach ($this->model->__get('languages') as $locale => $lang) {
             if ($this->model instanceof Product) {
                 $langs .= "<li class='lang'><a href='/myshop/" . $locale . "/" . Trans::_fd("product", $locale) . "/" . $lang . "'><img src='/myshop/images/flags/" . $locale . ".png' />" . Trans::_($locale) . "</a></li>";
             } else {
                 $langs .= "<li class='lang'><a href='/myshop/" . $locale . "/" . $lang . "'><img src='/myshop/images/flags/" . $locale . ".png' />" . Trans::_($locale) . "</a></li>";
             }
         }
         $langs .= "</ul></li>";
         echo "<script>\n                    \$(function() {\n                        \$('.langselect').html(\"" . $langs . "\");\n                    });\n                </script>";
     } else {
         echo "<script>\n                    \$(function() {\n                        \$('.top-nav').html(\"" . get_top_menu() . "\");\n                    });\n                </script>";
         $langs = "<li role='presentation' class='dropdown'><a class='dropdown-toggle' data-toggle='dropdown' href='#' role='button' aria-haspopup='true' aria-expanded='false'><img src='/myshop/images/flags/" . Trans::getDomain() . ".png' /></a><ul class='dropdown-menu'>";
         foreach (Trans::getAllDomains() as $lang) {
             if (strpos(RouteController::getCurrentRoute(), Trans::getDomain()) !== false) {
                 $langs .= "<li class='lang'><a href='/myshop" . str_replace(Trans::getDomain(), $lang, RouteController::getCurrentRoute()) . "'><img src='/myshop/images/flags/" . $lang . ".png' />" . Trans::_($lang) . "</a></li>";
             } else {
                 $langs .= "<li class='lang'><a href='/myshop/" . $lang . "'><img src='/myshop/images/flags/" . $lang . ".png' />" . Trans::_($lang) . "</a></li>";
             }
         }
         $langs .= "</ul></li>";
         echo "<script>\n                    \$(function() {\n                        \$('.langselect').html(\"" . $langs . "\");\n                    });\n                </script>";
     }
 }
コード例 #2
0
ファイル: ProductView.php プロジェクト: audef1/myShop
 public function render()
 {
     $products = "";
     foreach ($this->model->getProducts() as $product) {
         $image = json_decode($product->__get('images'), true);
         $productlink = "/myshop/" . Trans::getDomain() . "/" . Trans::_('product') . "/" . $product->__get('nicename');
         $products .= "<div class='col-md-3 special-products-grid text-center'>\n                                <a class='brand-name' href='" . $productlink . "'><img src='/myshop/images/brands/" . $product->__get('brand_nicename') . ".jpg' title='" . $product->__get('brand') . "'></a>\n                                <a class='product-here' href='" . $productlink . "'><img src='/myshop/images/products/" . $image['thumb'] . "' title='" . $product->__get('name1') . "'></a>\n                                <h4><a href='" . $productlink . "'>" . $product->__get('name1') . "</a></h4>\n                                <a class='product-btn' href='" . $productlink . "'><span>" . $product->__get('price2') . "</span><small>" . Trans::_('Get now!') . "</small><label></label></a>\n                            </div>";
     }
     echo "\n            <div class='content'>\n                <div class='container'>\n                    <!----speical-products---->\n                    <div class='special-products'>\n                        <div class='s-products-head'>\n                            <div class='s-products-head-left'>\n                                <h3>SPECIAL <span>PRODUCTS</span></h3>\n                            </div>\n                            <div class='s-products-head-right'>\n                                <a href='" . Trans::_('products') . "'><span> </span>view all products</a>\n                            </div>\n                            <div class='clearfix'> </div>\n                        </div>\n                        <!----special-products-grids---->\n                        <div class='special-products-grids'>\n                        " . $products . "\n                        <div class='clearfix'> </div>\n                        </div>\n                        <!---//special-products-grids---->\n                    </div>\n                    <!---//speical-products---->\n                </div>\n                <!----//content---->\n        ";
 }
コード例 #3
0
ファイル: Products.php プロジェクト: audef1/myShop
 public function __construct()
 {
     //connect to db and get page with $id
     $db = DatabaseController::getInstance();
     $mysqli = $db->getConnection();
     $sql_query = "SELECT product_id FROM product WHERE lang = '" . Trans::getDomain() . "' AND hidden != 1;";
     if ($result = $mysqli->query($sql_query)) {
         while ($row = mysqli_fetch_row($result)) {
             $this->products[] = new Product($row[0]);
         }
         /* free result set */
         mysqli_free_result($result);
     }
 }
コード例 #4
0
ファイル: CartView.php プロジェクト: audef1/myShop
 public function render()
 {
     echo "<div class='content'>\n                <div class='container'>\n                    <div class='p-content'>\n                        <div class='p-content-header'>\n                            <div class='p-content-header-left'>\n                                 <h1>" . Trans::_('Your Cart') . "</h1>\n                            </div>\n                            <div class='p-content-header-right'>\n\n                            </div>\n                            <div class='clearfix'> </div>\n                        </div>";
     $products = "";
     foreach ($this->model->getProducts() as $product) {
         $images = json_decode($product->__get('images'), true);
         $products .= "<tr>\n                            <td>\n                                <a href='/myshop/" . Trans::getDomain() . "/" . Trans::_('product') . "/" . $product->__get('nicename') . "'><img src='/myshop/images/products/" . $images['thumb'] . "' class='cartthumb' height='60px'/></a><a href='/myshop/" . Trans::getDomain() . "/" . Trans::_('product') . "/" . $product->__get('nicename') . "' class='cartproductlink'><b>" . $product->__get('name1') . "</b></a><br />" . Trans::_('size') . ": " . $product->__get('selectedoption') . "\n                            </td>\n                            <td>\n                                <input type='number' id='" . $product->__get('number') . "' min='0' value='" . $product->__get('amount') . "' disabled>\n                                <a href='/myshop/" . Trans::getDomain() . "/" . Trans::_('cart') . "/update/" . $product->__get('uid') . "/" . ($product->__get('amount') + 1) . "'><i class='fa fa-plus-square'></i></a>\n                                <a href='/myshop/" . Trans::getDomain() . "/" . Trans::_('cart') . "/update/" . $product->__get('uid') . "/" . ($product->__get('amount') - 1) . "'><i class='fa fa-minus-square'></i></a>\n                            </td>\n                            <td>" . number_format($product->__get('price2'), 2) . "</td>\n                            <td>" . number_format($product->__get('price2') * $product->__get('amount'), 2) . "</td>\n                            <td>\n                                <a href='/myshop/" . Trans::getDomain() . "/" . Trans::_('cart') . "/delete/" . $product->__get('uid') . "'><i class='fa fa-trash'></i></a>\n                            </td>\n                           </tr>";
     }
     if ($products == "") {
         echo Trans::_('cart empty');
     } else {
         echo "<form id='cartform' action='/myshop/" . Trans::getDomain() . "/" . Trans::_('checkout') . "' method='post'>\n                    <div class='table-responsive'>\n                      <table class='table'>\n                        <thead>\n                          <tr>\n                            <th>" . Trans::_('details') . "</th>\n                            <th>" . Trans::_('amount') . "</th>\n                            <th>" . Trans::_('single price') . "</th>\n                            <th>" . Trans::_('total price') . "</th>\n                            <th></th>\n                          </tr>\n                        </thead>\n                        <tbody>\n\n                        " . $products . "\n\n                        </tbody>\n                      </table>\n                    </div>\n                    <div class='container-fluid'>\n                        <div class='row'>\n                            <div class='col-md-8'>\n                                <strong>Total: " . number_format($this->model->getCartBalance(), 2) . " CHF</strong>\n                            </div>\n                            <div class='col-md-4'>\n                                <button id='checkout' name='checkout' class='btn btn-success'>" . Trans::_('Checkout') . "</button>\n                            </div>\n                        </div>\n                    </div>\n                  </form>";
     }
     echo "    </div>\n                </div>\n            </div>";
 }
コード例 #5
0
ファイル: functions.php プロジェクト: audef1/myShop
function get_bottom_menu()
{
    $menu = "<ul class='unstyled-list list-inline'>";
    $lang = Trans::getDomain();
    $pages = array();
    //add products page to menu
    if ($lang == "en_EN") {
        $pages[] = array("Products", "/myshop/products");
    } else {
        if ($lang == "de_DE") {
            $pages[] = array("Produkte", "/myshop/produkte");
        } else {
            if ($lang == "fr_FR") {
                $pages[] = array("Produits", "/myshop/produits");
            }
        }
    }
    // dynamically create page-routes from db
    $db = DatabaseController::getInstance();
    $mysqli = $db->getConnection();
    $sql_query = "SELECT `nicename`,`title`,`pos` FROM pages WHERE lang = '" . $lang . "' AND inmenu = '1' ORDER BY pos DESC;";
    $result = $mysqli->query($sql_query) or trigger_error($mysqli->error . "[{$sql_query}]");
    while ($row = $result->fetch_row()) {
        $pages[] = array($row[1], "/myshop/" . $row[0]);
    }
    //add contact page to menu
    if ($lang == "en_EN" || $lang == "fr_FR") {
        $pages[] = array("Contact", "/myshop/contact");
    } else {
        if ($lang == "de_DE") {
            $pages[] = array("Kontakt", "/myshop/kontakt");
        }
    }
    $l = count($pages);
    //add menu with separators
    for ($i = 0; $i < $l; $i++) {
        if ($i == $l - 1) {
            $menu .= "<li><a href='" . $pages[$i][1] . "'> " . $pages[$i][0] . "</a></li>";
        } else {
            $menu .= "<li><a href='" . $pages[$i][1] . "'> " . $pages[$i][0] . "</a><span></span></li>";
        }
    }
    $menu .= "<div class='clearfix'></div></ul>";
    return $menu;
}
コード例 #6
0
ファイル: cookies.php プロジェクト: audef1/myShop
function setNewLangInCookie()
{
    $_COOKIE['locale'] = Trans::getDomain();
    //setcookie("locale",Trans::getDomain(),time()+(60*60*24*360));
}
コード例 #7
0
ファイル: RegisterView.php プロジェクト: audef1/myShop
 public function render()
 {
     echo "<script type='text/javascript' src='/myshop/js/jquery.validate.min.js'></script>";
     echo "\n            <div class='content'>\n                <div class='container'>\n                    <div class='p-content'>\n                        <div class='p-content-header'>\n                            <div class='p-content-header-left'>\n                                 <h1>" . Trans::_('Register') . "</h1>\n                            </div>\n                            <div class='p-content-header-right'>\n\n                            </div>\n                            <div class='clearfix'> </div>\n                        </div>\n\n                        <form id='regform' name='regform' action='/myshop/" . Trans::getDomain() . "/" . Trans::_('register') . "' method='POST' class='form-horizontal'>\n                            <fieldset>\n                                <legend>" . Trans::_('logininformation') . "</legend>\n                                 <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='login'>" . Trans::_('loginname') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='login' name='login' type='text' class='form-control input-md' required=''>\n                                  </div>\n                                </div>\n\n                                <!-- Password input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='password'>" . Trans::_('password') . "</label>\n                                  <div class='col-md-5'>\n                                    <input id='password' name='password' type='password' class='form-control input-md' required=''>\n                                  </div>\n                                </div>\n\n                                <!-- Password input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='password2'>" . Trans::_('repeat password') . "</label>\n                                  <div class='col-md-5'>\n                                    <input id='password2' name='password2' type='password' class='form-control input-md' required=''>\n                                  </div>\n                                </div>\n                            </fieldset>\n\n                            <fieldset>\n                                <legend>" . Trans::_('shippingaddress') . "</legend>\n                                <!-- Select Basic -->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='title'>" . Trans::_('title') . "</label>\n                                  <div class='col-md-4'>\n                                    <select id='title' name='title' class='form-control' required>\n                                      <option value='" . Trans::_('mr') . "'>" . Trans::_('mr') . "</option>\n                                      <option value='" . Trans::_('mrs') . "'>" . Trans::_('mrs') . "</option>\n                                    </select>\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='firstname'>" . Trans::_('firstname') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='firstname' name='firstname' type='text' class='form-control input-md' required>\n\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='lastname'>" . Trans::_('lastname') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='lastname' name='lastname' type='text' class='form-control input-md' required>\n\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='address'>" . Trans::_('address') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='address' name='address' type='text' class='form-control input-md' required>\n\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='zip'>" . Trans::_('zip') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='zip' name='zip' type='text' class='form-control input-md' required>\n\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='location'>" . Trans::_('location') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='location' name='location' type='text' class='form-control input-md' required>\n\n                                  </div>\n                                </div>\n                            </fieldset>\n\n                            <fieldset>\n                                <legend>" . Trans::_('contactinformation') . "</legend>\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='email'>" . Trans::_('email') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='email' name='email' type='text' class='form-control input-md' required>\n\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='phone'>" . Trans::_('phone') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='phone' name='phone' type='text' class='form-control input-md'>\n\n                                  </div>\n                                </div>\n                            </fieldset>\n\n                            <fieldset>\n                                <legend>" . Trans::_('billingaddress') . "</legend>\n                                <!-- Select Basic -->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='title2'>" . Trans::_('title') . "</label>\n                                  <div class='col-md-4'>\n                                    <select id='title2' name='title2' class='form-control'>\n                                      <option value=''></option>\n                                      <option value='" . Trans::_('mr') . "'>" . Trans::_('mr') . "</option>\n                                      <option value='" . Trans::_('mrs') . "'>" . Trans::_('mrs') . "</option>\n                                    </select>\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='firstname2'>" . Trans::_('firstname') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='firstname2' name='firstname2' type='text' class='form-control input-md'>\n\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='lastname2'>" . Trans::_('lastname') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='lastname2' name='lastname2' type='text' class='form-control input-md'>\n\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='address2'>" . Trans::_('address') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='address2' name='address2' type='text' class='form-control input-md'>\n\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='zip2'>" . Trans::_('zip') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='zip2' name='zip2' type='text' class='form-control input-md'>\n\n                                  </div>\n                                </div>\n\n                                <!-- Text input-->\n                                <div class='form-group'>\n                                  <label class='col-md-4 control-label' for='location2'>" . Trans::_('location') . "</label>\n                                  <div class='col-md-5'>\n                                  <input id='location2' name='location2' type='text' class='form-control input-md'>\n\n                                  </div>\n                                </div>\n                            </fieldset>\n\n                            <!-- Multiple Checkboxes -->\n                            <div class='form-group'>\n                              <label class='col-md-4 control-label' for='billingaddress'>" . Trans::_('billingaddress') . "</label>\n                              <div class='col-md-4'>\n                              <div class='checkbox'>\n                                <label for='billingaddress-0'>\n                                  <input type='checkbox' name='billingaddress' id='billingaddress-0' value='1' checked>\n                                  " . Trans::_('isbillingaddress') . "\n                                </label>\n                                </div>\n                              </div>\n                            </div>\n\n                            <!-- Button -->\n                            <div class='form-group'>\n                              <label class='col-md-4 control-label' for='register'></label>\n                              <div class='col-md-4'>\n                                <input type='hidden' name='reggo' id='reggo' value='1' style='display: none;' />\n                                <button id='register' name='register' type='submit' class='btn btn-default'>" . Trans::_('Register') . "</button>\n                              </div>\n                            </div>\n\n                            </fieldset>\n                        </form>\n\n                         <script>\n\n                         \$.validator.addMethod('nospecialchars', function(value, element) {\n                                return this.optional(element) || /^[a-z A-Z 0-9 ÖÄÜäöüéèà +._-]+\$/i.test(value);\n                         }, 'No special Characters allowed.');\n\n                         \$('#regform').validate({\n                           rules: {\n                                login: {\n                                  required: true,\n                                  remote: {\n                                        url: '/myshop/inc/logincheck.php',\n                                        type: 'post',\n                                  },\n                                  nospecialchars: true,\n                                },\n                                password: '******',\n                                password2: {\n                                  equalTo: '#password'\n                                },\n                                email: {\n                                  required: true,\n                                  email: true\n                                },\n                                phone: 'nospecialchars',\n                                title: 'required',\n                                firstname: {\n                                    required: true,\n                                    nospecialchars: true,\n                                },\n                                lastname: {\n                                    required: true,\n                                    nospecialchars: true,\n                                },\n                                address: {\n                                    required: true,\n                                    nospecialchars: true,\n                                },\n                                zip: {\n                                    required: true,\n                                    nospecialchars: true,\n                                },\n                                location: {\n                                    required: true,\n                                    nospecialchars: true,\n                                },\n                                firstname2: {\n                                    nospecialchars: true,\n                                },\n                                lastname2: {\n                                    nospecialchars: true,\n                                },\n                                address2: {\n                                    nospecialchars: true,\n                                },\n                                zip2: {\n                                    nospecialchars: true,\n                                },\n                                location2: {\n                                    nospecialchars: true,\n                                },\n                           },\n                           messages: {\n                                login: {\n                                    required: '" . Trans::_('required') . "',\n                                    remote: '" . Trans::_('usertaken') . "',\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                password: '******'required') . "',\n                                password2: {\n                                    required: '" . Trans::_('required') . "',\n                                    equalTo: '" . Trans::_('notequal') . "',\n                                },\n                                email: {\n                                    required: '" . Trans::_('required') . "',\n                                    email: '" . Trans::_('validemail') . "',\n                                },\n                                phone: {\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                title: {\n                                    required: '" . Trans::_('required') . "',\n                                },\n                                firstname: {\n                                    required: '" . Trans::_('required') . "',\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                lastname: {\n                                    required: '" . Trans::_('required') . "',\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                address: {\n                                    required: '" . Trans::_('required') . "',\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                zip: {\n                                    required: '" . Trans::_('required') . "',\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                location: {\n                                    required: '" . Trans::_('required') . "',\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                firstname2: {\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                lastname2: {\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                address2: {\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                zip2: {\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                                location2: {\n                                    nospecialchars: '" . Trans::_('nospecialchars') . "',\n                                },\n                           },\n                         });\n                         </script>\n                </div>\n            </div>\n        ";
 }
コード例 #8
0
ファイル: HeaderView.php プロジェクト: audef1/myShop
 public function render()
 {
     echo "\n                <div class='container'>\n                    <div class='top-header'>\n                        <div class='logo'>\n                            <a href='/myshop/" . Trans::getDomain() . "'><img src='/myshop/images/logo.png' title='myshop' /></a>\n                        </div>\n                        <div class='top-header-info'>\n                            <div class='top-contact-info'>\n                                <ul class='unstyled-list list-inline'>\n                                    <li><i class='fa fa-phone'></i> +41 12 345 67 89</li>\n                                    <li><i class='fa fa-envelope'></i> <a href='mailto:info@mywebshop.ch'>info@mywebshop.ch</a></li>\n                                    <li>\n                                        <span class='lang'></span>\n                                        <ul class='langselect'>\n                                            <!-- here come the languages from the languageview -->\n                                        </ul>\n                                    </li>\n                                    <div class='clearfix'> </div>\n                                </ul>\n                            </div>\n                            <div class='cart-details'>\n                                <div class='add-to-cart'>\n                                    <ul class='unstyled-list list-inline'>\n                                    " . $this->cart . "\n                                    </ul>\n                                </div>\n                                <div class='login-rigister'>\n                                    <ul class='unstyled-list list-inline loginregister'>\n                                        " . $this->login . "\n                                    </ul>\n                                </div>\n                                <div class='clearfix'> </div>\n                            </div>\n                        </div>\n                        <div class='clearfix'> </div>\n                    </div>\n                    <div class='top-header-nav'>\n                        <nav class='top-nav main-menu'>\n                            " . get_top_menu() . "\n                            <a href='#' id='pull'><img src='/myshop/images/nav-icon.png' title='menu' /></a>\n                        </nav>\n                        <!-- <div class='top-header-search-box'>\n                            <form>\n                                <input type='text' placeholder='" . Trans::_('Search') . "' required  maxlength='22'>\n                                <input type='submit' value=' ' >\n                            </form>\n                        </div> -->\n                        <div class='clearfix'></div>\n                    </div>\n                </div>\n            ";
 }
コード例 #9
0
ファイル: SingleProductView.php プロジェクト: audef1/myShop
 public function render()
 {
     echo "\n            <!----content---->\n\t\t\t<div class='content'>\n\t\t\t\t<div class='container'>\n\t\t\t\t<!----product-details--->\n\t\t\t\t<div class='product-details'>\n\t\t\t\t\t<div class='container'>\n\t\t\t\t\t<div class='product-details-row1'>\n\t\t\t\t\t\t<div class='product-details-row1-head'>\n\t\t\t\t\t\t\t<h2>" . $this->model->__get('name1') . "</h2>\n\t\t\t\t\t\t\t<p>" . $this->model->__get('name2') . "</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='col-md-4 product-details-row1-col1'>\n\t\t\t\t\t\t<div class='details-left'>\n\t\t\t\t\t\t    <!--- images --->\n\t\t\t\t\t\t\t<div class='details-left-slider'>\n                                " . $this->images . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='col-md-8 product-details-row1-col2'>\n\t\t\t\t\t\t<div class='product-price'>\n\t\t\t\t\t\t    <span class='bargain'>" . $this->model->__get('price1') . "</span>\n\t\t\t\t\t\t\t<h5>" . $this->model->__get('price2') . " CHF</h5>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='product-price-details'>\n\t\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t    \t<div class='col-md-3'>\n\t\t\t\t\t\t    \t    <p>" . Trans::_('stock') . ": " . $this->model->__get('stock') . "</p>\n\t\t\t\t\t\t    \t</div>\n\t\t\t\t\t\t    \t<div class='col-md-9'>\n\t\t\t\t\t\t    \t    <a class='shipping' href='/myshop/" . Trans::getDomain() . "/" . Trans::_('shipping') . "'><span></span>" . Trans::_('Free shipping') . "</a>\n\t\t\t\t\t\t    \t</div>\n\t\t\t\t\t\t    </div>\n\t\t\t\t\t\t\t<div class='clearfix'> </div>\n\n\t\t\t\t\t\t    <div class='row'>\n\n\t\t\t\t\t\t\t\t" . $this->options . "\n\n                                <label class='col-md-2 control-label' for='qty-select'>" . Trans::_('amount') . ":</label>\n                                <div class='col-md-2'>\n                                    <select id='qty-select' name='qty-select' class='form-control'>\n                                      <option value='1'>1</option>\n                                      <option value='2'>2</option>\n                                      <option value='3'>3</option>\n                                      <option value='4'>4</option>\n                                      <option value='5'>5</option>\n                                    </select>\n                                </div>\n\n                                <div class='col-md-4 add-cart-btn'>\n\t\t\t\t\t\t\t\t    " . $this->button . "\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<script>\n                                        \$( '#addtocart' ).click(function() {\n\n                                        var qty = \$('#qty-select').find(\":selected\").text();\n                                        var opt = \$('#size-select').find(\":selected\").text();\n                                        carturl = \"/myshop/" . Trans::_('cart') . "/add/" . $this->model->__get('number') . "/\" + qty + \"/\" + opt + \"\";\n\n                                            if (qty > " . $this->model->__get('stock') . "){\n                                                \$('.message').html(\"<div class='alert alert-danger message msg1' role='alert'>" . Trans::_('not enough stock') . "</div>\");\n                                                \$(function() { setTimeout(function() { \$('.msg1').hide(400) }, 2500); });\n                                            }\n                                            else{\n                                                \$.ajax({\n                                                    method: 'GET',\n                                                    url: carturl,\n                                                    })\n                                                    .done(function( msg ) {\n                                                        \$('.badge').html(parseInt(\$('.badge').text()) + 1);\n                                                        console.log(carturl);\n                                                        \$('.message').html(\"<div class='alert alert-success message msg2' role='alert'>" . Trans::_('added to cart') . "</div>\");\n                                                        \$(function() { setTimeout(function() { \$('.msg2').hide(400) }, 2500); });\n                                                });\n                                            }\n                                        });\n\t\t\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='message'></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='clearfix'></div>\n\t\t\t\t<!--//product-details--->\n\t\t\t\t</div>\n\t\t\t\t<!---- product-details ---->\n\t\t\t\t<div class='product-tabs'>\n\t\t\t\t\t<!--Horizontal Tab-->\n\t\t\t\t    <div id='horizontalTab'>\n\t\t\t\t        <ul>\n\t\t\t\t            <li><a href='#tab-1'>" . Trans::_('Product overview') . "</a></li>\n\t\t\t\t            <li><a href='#tab-2'>" . Trans::_('Features') . "</a></li>\n\t\t\t\t        </ul>\n\t\t\t\t        <div id='tab-1' class='product-complete-info'>\n\t\t\t\t        \t<h3>" . Trans::_('Description') . ":</h3>\n\t\t\t\t        \t<p>" . $this->model->__get('description') . "</p>\n\t\t\t\t       \t\t<span>" . Trans::_('Details') . ":</span>\n\t\t\t\t       \t\t<div class='product-fea'>\n\t\t\t\t       \t\t\t" . $this->details . "\n\t\t\t\t       \t\t</div>\n\t\t\t\t        </div>\n\t\t\t\t        <div id='tab-2' class='product-complete-info'>\n\t\t\t\t        \t<h3>" . Trans::_('Description') . "</h3>\n\t\t\t\t        \t" . $this->features . "\n\t\t\t\t        </div>\n\t\t\t\t    </div>\n\t\t\t\t</div>\n\t\t\t\t<!-- //product-details ---->\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t    <div class='clearfix'></div>\n\t\t    </div>\n\n\t\t    <!-- Images etalage -->\n\t\t    <script>\n\t\t\t    \$(document).ready(function(\$){\n                    \$('#etalage').etalage({\n\t\t    \t    thumb_image_width: 300,\n\t\t\t    \t    thumb_image_height: 400,\n\t\t\t    \t    source_image_width: 900,\n\t\t\t    \t    source_image_height: 1000,\n\t\t\t    \t    show_hint: true,\n\t\t\t    \t    click_callback: function(image_anchor, instance_id){\n                            alert('achtung!');\n                        }\n\t\t\t        });\n                    // This is for the dropdown list example:\n                    \$('.dropdownlist').change(function(){\n                        etalage_show( \$(this).find('option:selected').attr('class') );\n                    });\n                });\n            </script>\n\n\t\t    <!-- Responsive Tabs JS -->\n\t\t\t<script type='text/javascript'>\n                \$(document).ready(function () {\n                    \$('#horizontalTab').responsiveTabs({\n                        rotate: false,\n                        startCollapsed: 'accordion',\n                        collapsible: 'accordion',\n                        setHash: true,\n                        disabled: [3,4],\n                        activate: function(e, tab) {\n                            \$('.info').html('Tab <strong>' + tab.id + '</strong> activated!');\n                        }\n                    });\n                    \$('#start-rotation').on('click', function() {\n                        \$('#horizontalTab').responsiveTabs('active');\n                    });\n                    \$('#stop-rotation').on('click', function() {\n                        \$('#horizontalTab').responsiveTabs('stopRotation');\n                    });\n                    \$('#start-rotation').on('click', function() {\n                        \$('#horizontalTab').responsiveTabs('active');\n                    });\n                    \$('.select-tab').on('click', function() {\n                        \$('#horizontalTab').responsiveTabs('activate', \$(this).val());\n                    });\n                });\n\t\t    </script>\n\t\t    ";
 }