Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: products.php
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" /> <!--jquery ui slider css--> <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <!--Get your own code at fontawesome.com--> <style> .pera_line_break_word_2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .sidebar .filter { box-shadow: #f0f0f0 0px 0px 0px 3px; } .listing_dropdown { cursor: pointer !important; } .header_nav .filter_list li a { list-style: none !important; text-decoration: none !important; line-height: 25px; font-weight: 400; word-break: normal; color: #8c8c8c; font-family: "Poppins", sans-serif; ; font-size: 12px; padding: 4px 15px; } .sidebar .filter_list li, .sidebar .filter_list li a { list-style: none !important; text-decoration: none !important; line-height: 25px; font-weight: 400; word-break: break-all; color: #8c8c8c; font-family: "Poppins", sans-serif; ; font-size: 12px; padding: 4px 0px; } .faq-section h5 a[aria-expanded="true"]:before { content: "\f106"; font-family: 'FontAwesome'; font-weight: 600; color: #000 !important; float: right; } .faq-section h5 a[aria-expanded="false"]:after { content: "\f107"; font-family: 'FontAwesome'; font-weight: 600; color: #000 !important; float: right; } .filter a { display: block; position: relative; color: black; font-weight: 700 !important; text-transform: capitalize; font-size: 14px !important; font-family: "Poppins", sans-serif; line-height: 24px; } .faq-section .mb-0>a:hover { text-decoration: none !important; } .border_blue { border-top: 2px solid var(--site-main-color) !important; width: 25%; margin-top: 10px; } h2 { font-size: 1.6em !important; } .filter .card-header, .filter .card-body { padding: .75rem 1.25rem !important; } .filter_list li, .filter_list li a { list-style: none !important; text-decoration: none !important; line-height: 15px; font-weight: 400 !important; word-break: break-all; color: #8c8c8c; font-size: 12px; padding: 4px 0px; } .card-header, .card-body { padding-left: 0px !important; } .card-header { padding-top: 0px !important; } .price-range-slider { width: 100%; float: left; padding: 0; } .price-range-slider .range-value { margin: 0; } .price-range-slider .range-value input { background: none; color: #000; width: 75%; font-size: 16px; font-weight: initial; box-shadow: none; border: none; margin: 10px 0 10px 0; } .font-25 { font-size: 25px !important; } .price-range-slider .range-bar { border: none; background: #000; height: 3px; width: 100%; margin-left: 8px; } .price-range-slider .range-bar .ui-slider-range { background: #06b9c0; } .price-range-slider .range-bar .ui-slider-handle { border: none; border-radius: 50%; background: #06b9c0; border: 2px solid #06b9c0; height: 13px; width: 13px; top: -0.4em; cursor: pointer; } .price-range-slider .range-bar .ui-slider-handle:focus { outline: none !important; box-shadow: none !important; } /*--- /.price-range-slider ---*/ #heading-inner-1>a:after { content: "\f067"; font-family: "Font Awesome 5 Free"; position: absolute; right: 21px; font-size: 14px; color: #000 !important; font-weight: 600; } #heading-inner-1>a[aria-expanded="true"]:after { content: "\f068"; font-family: "Font Awesome 5 Free"; font-weight: 600; font-size: 14px; color: #000 !important; } .page-title{ color: var(--site-main-color); text-shadow: 0px 5px 5px rgba(0, 0, 0, 0.25); font-size: 45px; font-weight: bold; margin-bottom: 15px } .site-color{ background-color: var(--site-main-color) !important; border-color: var(--site-main-color) !important; } </style> <?php //$this->load->view('site/layout/ecomm_breadcrumb'); $ci = &get_instance(); ?> <div class="product-list-grid-view-area"> <div class="container"> <?php if (isset($_GET['sortByBrand']) || isset($_GET['price_filter']) || isset($_GET['sort']) || isset($_GET['sortByCategory'])) { ?> <p style="font-size: 16px">Filters: <?php if (isset($_GET['sortByBrand'])) { foreach ($_GET['sortByBrand'] as $key => $value) { ?> <span class="tag label label-danger" style="background-color: white !important; color: #d4a300;font-weight: 500;margin: 5px"> <span><?php echo $ci->get_single_info(array('id' => $value), 'brand_name', 'tbl_gf_ecomm_brands') ?></span> </span> <?php } } ?> <?php if (isset($_GET['sortByCategory'])) { foreach ($_GET['sortByCategory'] as $key => $value) { ?> <span class="tag label label-danger" style="background-color: white !important; color: #d4a300;font-weight: 500;margin: 5px"> <span><?php echo $ci->get_single_info(array('id' => $value), 'category_name', 'tbl_gf_ecomm_category') ?></span> </span> <?php } } ?> <?php if (isset($_GET['price_filter'])) { ?> <span class="tag label label-danger" style="background-color: rgba(255,82,82,1);font-weight: 500;margin: 5px"> <span>Price Range: <?php echo ucwords($_GET['price_filter']) ?></span> <a href="" style="color: #FFF" data-action="price" class="remove_filter"><i class="fa fa-close"></i></a> </span> <?php } ?> <?php if (isset($_GET['sort'])) { ?> <span class="tag label label-danger" style="background-color: rgba(255,82,82,1);font-weight: 500;margin: 5px"> <span>Sort By: <?php echo ucwords($_GET['sort']) ?></span> <a href="" style="color: #FFF" data-action="sort" class="remove_filter"><i class="fa fa-close"></i></a> </span> <?php } ?> </p> <hr style="margin: 10px 0px" /> <?php } ?> <div class="row"> <div class="row borderd-bottom ml-0 mr-0 mt-5" style="text-align: center;vertical-align: middle;padding-top: 18px;width: 100%;"> <div class="col-md-12 pl-lg-0"> <h2 class="text-blue font-weight-normal-50 pb-2 text-capitilize" style="font-size:30px"><span><a href="<?=base_url('shop');?>" class="page-title"><?=$page_title?></a></span> </h2> </div> </div> <div class="row borderd-bottom ml-0 mr-0 mt-0" style="text-align: center;vertical-align: middle;padding-top: 18px;width: 100%;"> <div class="col-md-12 pl-lg-0 p-2 text-white" style="font-size: 29px;background-color: var(--site-main-color);"> <?php print_r(ucwords(str_replace('-', ' ', $category_title))) ?> </div> </div> <!-- SIDE BAR --> <div class="col-lg-3 col-md-4"> <?php if ($sub_category_list) { ?> <div class="widget widget-shop-categories card rounded"> <div class="bg_clrsss"> <h5 class="pl-4 pr-4 pt-3 widget-shop-title mb-0">Categories</h5> </div> <div class="widget-content pl-4 pr-4 pt-3 pb-3"> <form action="get_products_list" id="category_sort" method="get"> <ul class="brand-menu"> <?php echo $sub_category_list; ?> </ul> <?php if (isset($_GET['sort']) && isset($_GET['price_filter']) && isset($_GET['sortByBrand'])) { echo '<input type="hidden" name="sort" value="' . $_GET['sort'] . '">'; echo '<input type="hidden" name="price_filter" value="' . $_GET['price_filter'] . '">'; foreach ($_GET['sortByBrand'] as $key => $value) { echo '<input type="hidden" name="sortByBrand[]" value="' . $value . '">'; } } else if (isset($_GET['sort']) && isset($_GET['sortByBrand']) && !isset($_GET['price_filter'])) { echo '<input type="hidden" name="sort" value="' . $_GET['sort'] . '">'; foreach ($_GET['sortByBrand'] as $key => $value) { echo '<input type="hidden" name="sortByBrand[]" value="' . $value . '">'; } } else if (!isset($_GET['sort']) && isset($_GET['price_filter']) && isset($_GET['sortByBrand'])) { echo '<input type="hidden" name="price_filter" value="' . $_GET['price_filter'] . '">'; foreach ($_GET['sortByBrand'] as $key => $value) { echo '<input type="hidden" name="sortByBrand[]" value="' . $value . '">'; } } else if (isset($_GET['sort']) && isset($_GET['price_filter']) && !isset($_GET['sortByBrand'])) { echo '<input type="hidden" name="price_filter" value="' . $_GET['price_filter'] . '">'; echo '<input type="hidden" name="sort" value="' . $_GET['sort'] . '">'; } else if (!isset($_GET['sort']) && !isset($_GET['price_filter']) && isset($_GET['sortByBrand'])) { foreach ($_GET['sortByBrand'] as $key => $value) { echo '<input type="hidden" name="sortByBrand[]" value="' . $value . '">'; } } ?> </form> </div> </div> <?php } ?> <?php if (!empty($brand_list) && !empty($products)) { ?> <div class="widget widget-brand"> <h3 class="widget-title">Brands</h3> <div class="widget-content"> <form action="" id="brand_sort" method="get"> <ul class="brand-menu"> <?php $checked = ''; foreach ($brand_list as $key => $value) { if (!empty($_GET['sortByBrand'])) { if (in_array($value->id, $_GET['sortByBrand'])) { $checked = 'checked="checked"'; } else { $checked = ''; } } ?> <?php if ($products) { ?> <li> <label> <input type="checkbox" name="sortByBrand[]" class="brand_sort mr-2" <?php echo $checked ?> value="<?php echo $value->id ?>"> <?php echo $value->brand_name ?> <span class="pull-right pl-2">(<?php echo $brand_count_items[$value->id] ?>)</span> </label> </li> <?php } ?> <?php } ?> </ul> <?php if (isset($_GET['sort']) && isset($_GET['price_filter']) && isset($_GET['sortByCategory'])) { echo '<input type="hidden" name="sort" value="' . $_GET['sort'] . '">'; echo '<input type="hidden" name="price_filter" value="' . $_GET['price_filter'] . '">'; foreach ($_GET['sortByCategory'] as $key => $value) { echo '<input type="hidden" name="sortByCategory[]" value="' . $value . '">'; } } else if (isset($_GET['sort']) && !isset($_GET['price_filter']) && isset($_GET['sortByCategory'])) { echo '<input type="hidden" name="sort" value="' . $_GET['sort'] . '">'; foreach ($_GET['sortByCategory'] as $key => $value) { echo '<input type="hidden" name="sortByCategory[]" value="' . $value . '">'; } } else if (!isset($_GET['sort']) && isset($_GET['price_filter']) && isset($_GET['sortByCategory'])) { echo '<input type="hidden" name="price_filter" value="' . $_GET['price_filter'] . '">'; foreach ($_GET['sortByCategory'] as $key => $value) { echo '<input type="hidden" name="sortByCategory[]" value="' . $value . '">'; } } else if (isset($_GET['sort']) && isset($_GET['price_filter']) && !isset($_GET['sortByCategory'])) { echo '<input type="hidden" name="price_filter" value="' . $_GET['price_filter'] . '">'; echo '<input type="hidden" name="sort" value="' . $_GET['sort'] . '">'; } else if (!isset($_GET['sort']) && !isset($_GET['price_filter']) && isset($_GET['sortByCategory'])) { foreach ($_GET['sortByCategory'] as $key => $value) { echo '<input type="hidden" name="sortByCategory[]" value="' . $value . '">'; } } ?> </form> </div> </div> <?php } ?> <div class="widget widget-shop-categories rounded"> <!-- <div class="bg_clrsss"> <h5 class="pl-4 pr-4 pt-3 widget-shop-title mb-0">Filter</h5> </div> --> <!-- <div id="accordion"> <div class="card filter mt-3 faq-section mb-5"> <div class="card-header border-0" id="heading-4"> <h5 class="mb-0"> <a role="button" data-toggle="collapse" href="#collapse-4" aria-expanded="false" aria-controls="collapse-4"> Filter By Keyword </a><div class="border_blue"></div> </h5> </div> <div id="collapse-4" class="collapse collapse_card" data-parent="#accordion" aria-labelledby="heading-4"> <form method="POST" class="form-inline my-2 my-lg-0" action="<?=base_url('ecomm/search')?>"> <div class="card-body pt-0"> <div class="input-group"> <input type="text" name="key" class="form-control" placeholder="Search"> <div class="input-group-append"> <button class="btn btn-success btn-md" type="submit"> <i class="fa fa-search"></i> </button> </div> </div> </div> </form> </div> </div> </div> --> <div id="accordion2"> <div class="card filter mt-3 faq-section mb-5"> <div class="card-header border-0" id="heading-4"> <h5 class="mb-0"> <a role="button" data-toggle="collapse" href="#collapse-4" aria-expanded="false" aria-controls="collapse-4"> Categories </a><div class="border_blue"></div> </h5> </div> <div id="collapse-4" class="collapse collapse_card" data-parent="#accordion2" aria-labelledby="heading-4"> <style type="text/css"> .left-menu-style ul li, .left-menu-style ul li a { list-style: none !important; text-decoration: none !important; line-height: 15px; font-weight: 400 !important; word-break: break-all; color: #8c8c8c; font-size: 12px; padding: 4px 0px; } .left-menu-style ul{ padding: 0 20px; } .left-menu-style ul li{ border-bottom: 1px solid #CECECE } </style> <div class="left-menu-style"> <ul> <?php foreach ($ecommCats as $category): ?> <?php if(!empty($category->category_image)) { $image = $category->category_image; } else { $image = 'no-image-1.jpg'; } ?> <li><a class="" href="<?php echo base_url('category/'.$category->category_slug) ?>" title="<?php echo $category->category_name; ?>"><?=$category->category_name?></a></li> <?php endforeach; ?> </ul> </div> </div> </div> <!-- --> </div> </div> <div class="clearfix"></div> </div> <!-- PRODUCTS SECTION --> <div class="col-lg-9 col-md-8"> <!-- <div class="row align-items-center shop-tab-menu border rounded p-3 mt-lg-0 mt-4"> <div class="col-md-5 col-sm-5 col-lg-6 col-xs-12"> <div class="shop-tab"> <ul class="d-flex myListing mb-0"> <li id="grid" class="grip active"><i class="fa fa-th" style="margin: 0 0.25rem;"></i></li> <li id="list" class="grip"><i class="fa fa-bars" style="margin: 0 0.25rem;"></i></li> </ul> </div> </div> <div class="col-md-1 col-sm-1 col-lg-1 col-xs-1 text-right "> <div class="toolbar-form"> <form action="" method="get" id="sort_filter_form"> <?php // if (isset($_GET['sortByBrand']) && isset($_GET['price_filter'])) { // foreach ($_GET['sortByBrand'] as $key => $value) { // echo '<input type="hidden" name="sortByBrand[]" value="' . $value . '">'; // } // echo '<input type="hidden" name="price_filter" value="' . $_GET['price_filter'] . '">'; // } else if (isset($_GET['sortByBrand']) && !isset($_GET['price_filter'])) { // foreach ($_GET['sortByBrand'] as $key => $value) { // echo '<input type="hidden" name="sortByBrand[]" value="' . $value . '">'; // } // } else if (!isset($_GET['sortByBrand']) && isset($_GET['price_filter'])) { // echo '<input type="hidden" name="price_filter" value="' . $_GET['price_filter'] . '">'; // } ?> </form> </div> </div> <div class="col-md-6 col-sm-6 col-lg-5 col-xs-12 text-right"> <div class="show-result"> <p class="mb-0 font-14 font-weight-bold"><?= $show_result; ?></p> </div> </div> </div> --> <div class="shop-product-area"> <!-- <div class="border-0" id="heading-1" style="margin: 12px 0px 25px -5px;"> <h5 class="mb-0"> <h4> Categories </h4> <div class="border_blue"></div> </h5> </div> --> <?php $THEME = $this->data['rsStngs']->Theme; define('IMG_PATH', base_url('uplds' . $THEME . '/ecomm/images/products') . '/'); define('IMG_SERVER_PATH', FCPATH . 'uplds' . $THEME . '/ecomm/images/products/'); define('IMG_PATH_GALLERY', base_url('uplds' . $THEME . '/ecomm/images/products/gallery') . '/'); if (empty($products) && empty($product_list)) { ?> <h1 class="text-center">Coming soon!</h1> <?php } ?> <div class="row view-group mb-5" id="products"> <?php $ci = &get_instance(); foreach ($product_list as $key => $row) { $user_id = $this->session->userdata('GSM_FUS_UserId') ? $this->session->userdata('GSM_FUS_UserId') : '0'; // $img_file='assets/images/products/'.$row->featured_image; if (!empty($row->variation_image) && file_exists(FCPATH . 'assets/images/products/variations/' . $row->variation_image)) { $img_file = $img_file2 = $ci->_create_thumbnail('assets/images/products/variations/', filename($row->variation_image), $row->variation_image, 258, 258); } else { if (file_exists(IMG_SERVER_PATH . $row->featured_image)) { $img_file = IMG_PATH . $row->featured_image; } else { $img_file = base_url('/uplds' . $THEME . '/ecomm/images/no-image-1.jpg'); } } ?> <div class="item col-xs-4 col-lg-4 listing mb-4" style="padding-top: 0;padding-bottom: 0;"> <div class="dasd hover_card" style="margin-top: 0; height: auto !important;padding-bottom: 15px;padding-top: 15px;"> <div class="img-event"> <a class="hover" href="<?php echo site_url('product/' . $row->product_slug); ?>" title="<?php echo $row->product_title ?>"> <div class="productimg img"> <img class="hover_image_hide" src="<?php echo $img_file; ?>" alt="<?php echo $row->product_title; ?>" alt="Card image cap"> <img class="Mobile_D_None" src="<?php echo $img_file; ?>" alt="<?php echo $row->product_title; ?>" alt="Card image cap"> </div> </a> </div> <div class="caption card-body pb-0"> <a class="hover font-20" href="<?php echo site_url('product/' . $row->product_slug); ?>" title="<?php echo $row->product_title ?>"> <h4 class="group font-20 card-title pera_line_break_word_2 inner list-group-item-heading"> <?php if (strlen($row->product_title) > 16) { echo substr(stripslashes($row->product_title), 0, 100); } else { echo $row->product_title; } ?> </h4> </a> </div> <div class="product_rating"> <i class="fa fa-star" style="color: #7a7a7a"></i> <i class="fa fa-star" style="color: #7a7a7a"></i> <i class="fa fa-star" style="color: #7a7a7a"></i> <i class="fa fa-star" style="color: #7a7a7a"></i> <i class="fa fa-star" style="color: #7a7a7a"></i> </div> <br class="product_rating"> <p class="mb-0 custom_12 product_rating"><?php echo $row->product_desc; ?></p> <div class="row listing"> <div class="col-xs-12 col-md-12"> <a class="hover" href="<?php echo site_url('product/' . $row->product_slug); ?>" title="<?php echo getusercurrency() . ' ' . Currency_Formator(getuserprice(($row->product_mrp))); ?>"> <p class="lead mt-lg-0 mt-2 mb-2" style="font-size: .90rem !important;"> <?php if ($row->you_save_amt != '0') { ?> <span class="old-price text-secondary" style="text-decoration: line-through;"><small><?php echo getusercurrency() . ' ' . Currency_Formator(getuserprice(($row->product_mrp))); ?></small></span> <br> <span class="new-price" style="color: var(--site-main-color)"><?php echo getusercurrency() . ' ' . Currency_Formator(getuserprice(($row->selling_price))); ?></span> <?php } else { ?> <span class="new-price" style="color: var(--site-main-color)"><?php echo getusercurrency() . ' ' . Currency_Formator(getuserprice(($row->product_mrp))); ?></span> <?php } ?> </p> </a> </div> <div class="col-xs-12 col-md-12"> <?php if (/*!$ci->check_cart($row->id,$user_id) ||*/true) { //show only add item to cart ?> <div class="View_collection mt-0"> <a class="custom_btn_12 mt-md-4 btn btn-success site-color btn-md" data-id="<?php echo $row->id ?>" data-maxunit="<?php echo $row->max_unit_buy ?>" style="" href="<?php echo site_url('product/' . $row->product_slug); ?>" data-toggle="tooltip" title="Add to Cart">Add to Cart</a> <button type="button" class="addToWishList mt-md-4 btn btn-outline-secondary btn-md" data-id="<?php echo isset($row->id) ? $row->id : '' ?>" data-toggle="tooltip" title="<?php echo isset($wishlistCheck) && $wishlistCheck->product_id == $row->id ? 'Remove From Wishlist' : 'Add To Wishlist' ?>"><i class="fa fa-heart"></i></button> </div> <?php } else { $cart_id = $ci->get_single_info(array('product_id' => $row->id, 'user_id' => $user_id), 'id', 'tbl_gf_ecomm_cart'); ?> <div class="View_collection mt-0"> <a class="custom_btn_ btn btn-primary btn-sm" style="" href="<?php echo site_url('remove-to-cart/' . $cart_id); ?>" data-toggle="tooltip" title="Remove to Cart">remove to cart</a> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> </div> </div> <?php if (!empty($links) || true) { ?> <div class="pb-5"> <?php echo $links; ?> </div> <?php } ?> </div> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min.js"></script> <script type="text/javascript" src="<?php echo base_url(); ?>/assets/site_assets/js/cust_javascript.js"></script> <script type="text/javascript"> $(function() { $(document).on('click', '.category_sort', function() { $('#category_sort').submit(); }); }); $(document).ready(function() { $('#list').click(function(event) { event.preventDefault(); $('#products .item').addClass('list-group-item'); }); $('#grid').click(function(event) { event.preventDefault(); $('#products .item').removeClass('list-group-item'); $('#products .item').addClass('grid-group-item'); }); }); $("#list").click(function() { $('.dasd').removeClass('hover_card'); }) $("#grid").click(function() { $('.dasd').addClass('hover_card'); }) $(function() { $('.myListing li').on('click', function() { $(this).parent().find('li.active').removeClass('active'); $(this).addClass('active'); }); $('.addToWishList').click(function() { var productId = $(this).attr('data-id'); $.ajax({ type: 'POST', url: '<?php echo site_url('Ecomm/wishlist_action') ?>', data: { product_id: productId }, success: function(response) { var obj = $.parseJSON(response); if (obj.success == '1') { location.reload(); } else { swal("Oh..!", obj.msg); } } }); }); }); $(function() { $("#slider-range").slider({ range: true, min: 100, max: 500000, values: [100, 500000], slide: function(event, ui) { $("#amount").val("£" + ui.values[0] + " - £" + ui.values[1]); }, }); $("#amount").val( "£" + $("#slider-range").slider("values", 0) + " - £" + $("#slider-range").slider("values", 1) ); }); </script>