Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1" />
- <title>MacroFer Paseo Ferretero S.A.</title>
- <?php
- error_reporting(0);
- header('Content-Type: text/html; charset=ISO-8859-1');
- ?>
- <?php
- ini_set('max_execution_time', 300);
- session_start();
- if(isset($_SESSION['nombre']))
- {
- ?>
- <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/dataTables.bootstrap.min.css"/>
- <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.1.1/css/responsive.bootstrap.min.css"/>
- <link rel="stylesheet" type="text/css" href="resources/css/footer.css"/>
- <link rel="stylesheet" type="text/css" href="resources/css/menu.css"/>
- <style>
- .badge-notify{
- background:red;
- position:relative;
- top: -20px;
- right: 10px;
- }
- .my-cart-icon-affix {
- position: fixed;
- z-index: 999;
- }
- </style>
- </head>
- <script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
- ga('create', 'UA-92529978-1', 'auto');
- ga('send', 'pageview');
- </script>
- <link rel="stylesheet" href="css/bootstrap.min.css">
- <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
- <script type="text/javascript" src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
- <script type="text/javascript" src="https://cdn.datatables.net/1.10.13/js/dataTables.bootstrap.min.js"></script>
- <script src="js/jquery.mycart.js"></script>
- <!--<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.1.1/js/dataTables.responsive.min.js"></script>
- --><script type="text/javascript" src="https://cdn.datatables.net/responsive/2.1.1/js/responsive.bootstrap.min.js"></script>
- <script type="text/javascript" src="resources/scripts/config_datatable_api.js" ></script>
- <script type="text/javascript" src="resources/scripts/tabla.js" ></script>
- <script type="text/javascript" src="resources/scripts/main.js" ></script>
- <script>
- $(document).ready(function() {
- var table = $('#sale').DataTable();
- $('#sale tbody').on( 'click', 'tr', function () {
- if ( $(this).hasClass('selected') ) {
- $(this).removeClass('selected');
- }
- else {
- table.$('tr.selected').removeClass('selected');
- $(this).addClass('selected');
- }
- } )});
- </script>
- <body class="container">
- <header>
- <div id="contenedor" style="background:#00A859;">
- <nav class="menu" >
- <ul>
- <li><a href="conversion.php">Productos</a></li>
- <li><a href="conversion.php">Tabla de conversion</a></li>
- <li><a href="logout.php">Desconectar</a></li>
- <li><a href="#"style="position: fixed; right:150px; top:0px;">Mi cuenta</a></li>
- <li><h1 style=" cursor:pointer; position:fixed; right:100px; top:-8px;">
- <span class="glyphicon glyphicon-shopping-cart my-cart-icon"><span class="badge badge-notify my-cart-badge"></span></span>
- </h1></li>
- </ul>
- </nav>
- </div>
- </header>
- <div class="container">
- <?php include 'bootstrap-slider.html';?>
- <img src="resources/images/logos.png" border='0'></img>
- <div class="container">
- <div class="clear"></div> <!-- End .clear -->
- <div style="width: 100%"class="table table-striped table-hover dt-responsive display nowrap"><!-- Start Content Box -->
- <div class="content-box-header">
- <h3>Listado de productos ( Los precios no incluyen IVA.)</h3>
- </div> <!-- End .content-box-header -->
- <div class="clear"></div>
- <div style="width: 100%; padding-left: -10px;" class="content-box-content" class="table table-striped table-hover dt-responsive display nowrap" cellspacing="0">
- <div class="table-responsive" id="tab1e"> <!-- This is the target div. id must match the href of this div's tab -->
- <table id="sale" >
- <thead>
- <tr>
- <!--<th><input class="check-all" type="checkbox" /></th>-->
- <th>Comprar</th>
- <th>Imágen</th>
- <th>Codigo</th>
- <th>Categoria</th>
- <th>Marca</th>
- <th>Descripción</th>
- <th>Precio</th>
- <th> ** </th>
- </tr>
- </thead>
- </tr>
- </tfoot>
- <tbody id="prueba">
- <?php
- include 'Productos.php';
- // recorre el array con el contador para mostrar todos
- // los productos activados
- if ($i <= $count){
- foreach($data as $k => $valor){
- if(($valor['publicaecommerce'] == 1) )
- {
- if(($valor['tipodeproducto'] == 'MAYORISTA') OR ($valor['tipodeproducto'] == 'AMBOS')) {
- if (($valor['activo'] == 1)){
- ?>
- <div>
- <tr id="prueba2">
- <td><button href="#" class="btn btn-danger my-cart-btn" data-id="<?php echo $valor['codigo'];?>" data-name="<?php echo $valor['descripcion'];?>" data-summary="summary 1" data-price="<?php echo $valor['precio1'];?>" data-quantity="1" data-image="<?php echo $valor['foto'];?>"><img src="resources/images/carrito.png" /></button>
- </td>
- <td><a href="#0" onclick="window.open('<?php if(empty($valor['foto']))
- echo 'img/nodis.jpg';
- else
- echo $valor['foto']; ?>','TITULO','width =550,height=400' );"><img
- src="<?php if(empty($valor['foto']))
- echo 'img/nodis.jpg';
- else
- echo $valor['foto'];
- ?>" border='0' width='50' height='50'> </td>
- <td><?php echo $valor['codigo']; ?> <input type="hidden" name="product_code" value="<?php echo $valor ['codigo']?>"></input></td>
- <td><?php echo $valor['familia'] ;?></td>
- <td><?php echo $valor['marca']; ?></td>
- <td><?php echo $valor['descripcion'] ;?> <input type="hidden" name="product_name" value="<?php echo $valor ['descripcion']?>"></input></td>
- <td><?php
- if ($valor['precio1'] <= 0)
- echo "Sin disponibilidad";
- else{ echo '$';
- echo ceil($valor['precio1']);} ?> <input type="hidden" name="product_price" value="<?php echo $valor ['precio1']?>"></input></td>
- <td><?php if ($valor['uso'] == 'SE FACTURA')
- { echo $valor['poriva'];echo '% ';} ?></td>
- </tr> </div> <?php }
- }}}
- }?>
- </tbody>
- </table>
- <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
- <script src="js/jquery.mycart.js"></script>
- <script type="text/javascript" src="js/bootstrap.min.js"></script>
- <script>
- $(function () {
- var goToCartIcon = function($addTocartBtn){
- var $cartIcon = $(".my-cart-icon");
- var $image = $('<img width="30px" height="30px" src="' + $addTocartBtn.data("image") + '"/>').css({"position": "fixed", "z-index": "999"});
- $addTocartBtn.prepend($image);
- var position = $cartIcon.position();
- $image.animate({
- top: position.top,
- left: position.left
- }, 500 , "linear", function() {
- $image.remove();
- });
- }
- $('.my-cart-btn').myCart({
- currencySymbol: '$',
- classCartIcon: 'my-cart-icon',
- classCartBadge: 'my-cart-badge',
- classProductQuantity: 'my-product-quantity',
- classProductRemove: 'my-product-remove',
- classCheckoutCart: 'my-cart-checkout',
- affixCartIcon: true,
- showCheckoutModal: true,
- checkoutCart: function(products) {
- $.each(products, function(){
- console.log(this);
- });
- },
- clickOnAddToCart: function($addTocart){
- goToCartIcon($addTocart);
- },
- afterAddOnCart: function(products, totalPrice, totalQuantity) {
- console.log("afterAddOnCart", products, totalPrice, totalQuantity);
- },
- clickOnCartIcon: function($cartIcon, products, totalPrice, totalQuantity) {
- console.log("cart icon clicked", $cartIcon, products, totalPrice, totalQuantity);
- },
- checkoutCart: function(products, totalPrice, totalQuantity) {
- var checkoutString = "Total Price: " + totalPrice + "\nTotal Quantity: " + totalQuantity;
- checkoutString += "\n\n id \t name \t summary \t price \t quantity \t image path";
- $.each(products, function(){
- checkoutString += ("\n " + this.id + " \t " + this.name + " \t " + this.summary + " \t " + this.price + " \t " + this.quantity + " \t " + this.image);
- });
- alert(checkoutString)
- console.log("checking out", products, totalPrice, totalQuantity);
- },
- getDiscountPrice: function(products, totalPrice, totalQuantity) {
- console.log("calculating discount", products, totalPrice, totalQuantity);
- return totalPrice ;
- }
- });
- });
- </script>
- </body>
- </div> <!-- End #tab1 -->
- </div> <!-- End .content-box-content -->
- </div>
- <!--
- </a>
- <div class="shopping-cart-box">
- <a href="#" class="close-shopping-cart-box" >Close</a>
- <h3>Your Shopping Cart</h3>
- <div id="shopping-cart-results">
- <script>
- $( ".close-shopping-cart-box").click(function(e){ //user click on cart box close link
- e.preventDefault();
- $(".shopping-cart-box").fadeOut(); //close cart-box
- });
- $( ".cart-box").click(function(e) { //when user clicks on cart box
- e.preventDefault();
- $(".shopping-cart-box").fadeIn(); //display cart box
- $("#shopping-cart-results").html('<img src="images/ajax-loader.gif">'); //show loading image
- $("#shopping-cart-results" ).load( "cart_process.php", {"load_cart":"1"}); //Make ajax request using jQuery Load() & update results
- });
- </script>-->
- </ul> <!-- End #main-nav -->
- <!-- End #sidebar -->
- <div class="container" class="content"> <!-- Main Content Section with everything -->
- <div class="copy-right-grids">
- <div class="copy-left">
- <p class="footer-gd">© Copyright <?php echo date("Y");?> | <a href="https://www.facebook.com/mattuqui.blanco">Matias Blanco - Diseños Web</a> |
- <a id="scroll-top" href="#" title="Go to Top">Arriba</a></p>
- </div>
- <div class="copy-right">
- <ul>
- </ul>
- </div>
- <div class="clear"></div>
- </div>
- </div> <!-- End #main-content -->
- </div>
- <?php
- }else {
- echo "Estás accediendo a una página restringida, para ver su contenido debes estar registrado.<br />
- <a href='mayoristas.html'>Ingresar</a>";
- }
- ?>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement