openbay_itemlist.twig (18835B)
1 {{ header }}{{ column_left }} 2 <div id="content"> 3 <div class="page-header"> 4 <div class="container-fluid"> 5 <div class="pull-right"> 6 {% if link_amazon_eu_bulk %} 7 <a class="btn btn-primary" href="{{ link_amazon_eu_bulk }}"><i class="fa fa-cloud-upload fa-lg"></i> {{ button_amazon_eu_bulk }}</a> 8 {% endif %} 9 {% if link_amazon_us_bulk %} 10 <a class="btn btn-primary" href="{{ link_amazon_us_bulk }}"><i class="fa fa-cloud-upload fa-lg"></i> {{ button_amazon_us_bulk }}</a> 11 {% endif %} 12 {% if link_ebay_bulk %} 13 <a class="btn btn-primary" id="button-ebay-bulk"><i class="fa fa-cloud-upload fa-lg"></i> {{ button_ebay_bulk }}</a> 14 {% endif %} 15 </div> 16 <h1>{{ heading_title }}</h1> 17 <ul class="breadcrumb"> 18 {% for breadcrumb in breadcrumbs %} 19 <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li> 20 {% endfor %} 21 </ul> 22 </div> 23 </div> 24 <div class="container-fluid"> 25 {% if error_warning %} 26 <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div> 27 {% endif %} 28 {% if success %} 29 <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}</div> 30 {% endif %} 31 <div class="panel panel-default"> 32 <div class="panel-heading"> 33 <h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3> 34 </div> 35 <div class="panel-body"> 36 <div class="well"> 37 <div class="row"> 38 <div class="col-sm-4"> 39 <div class="form-group"> 40 <label class="control-label" for="filter_name">{{ entry_title }}</label> 41 <input type="text" name="filter_name" value="{{ filter_name }}" placeholder="{{ entry_title }}" id="filter_name" class="form-control" /> 42 </div> 43 <div class="form-group"> 44 <label class="control-label" for="filter_model">{{ entry_model }}</label> 45 <input type="text" name="filter_model" value="{{ filter_model }}" placeholder="{{ entry_model }}" id="filter_model" class="form-control" /> 46 </div> 47 <div class="form-group"> 48 <label class="control-label" for="filter_manufacturer">{{ entry_manufacturer }}</label> 49 <select name="filter_manufacturer" id="filter_manufacturer" class="form-control"> 50 <option value=""></option> 51 {% for manufacturer in manufacturer_list %} 52 <option value="{{ manufacturer.manufacturer_id }}"{% if filter_manufacturer == manufacturer.manufacturer_id %} selected{% endif %}>{{ manufacturer.name }}</option> 53 {% endfor %} 54 </select> 55 </div> 56 </div> 57 <div class="col-sm-4"> 58 <div class="form-group"> 59 <label class="control-label" for="filter_marketplace">{{ entry_status_marketplace }}</label> 60 <select name="filter_marketplace" id="filter_marketplace" class="form-control"> 61 <option value="all"{% if filter_marketplace is empty or filter_marketplace == "all" %} selected{% endif %}>{{ text_status_all }}</option> 62 {% if marketplace_statuses.ebay %} 63 <option value="ebay_active"{% if filter_marketplace == "ebay_active" %} selected{% endif %}>{{ text_status_ebay_active }}</option> 64 <option value="ebay_inactive"{% if filter_marketplace == "ebay_inactive" %} selected{% endif %}>{{ text_status_ebay_inactive }}</option> 65 {% endif %} 66 {% if marketplace_statuses.amazon %} 67 <option value="amazon_saved"{% if filter_marketplace == "amazon_saved" %} selected{% endif %}>{{ text_status_amazoneu_saved }}</option> 68 <option value="amazon_uploaded"{% if filter_marketplace == "amazon_uploaded" %} selected{% endif %}>{{ text_status_amazoneu_processing }}</option> 69 <option value="amazon_ok"{% if filter_marketplace == "amazon_ok" %} selected{% endif %}>{{ text_status_amazoneu_active }}</option> 70 <option value="amazon_unlisted"{% if filter_marketplace == "amazon_unlisted" %} selected{% endif %}>{{ text_status_amazoneu_notlisted }}</option> 71 <option value="amazon_error"{% if filter_marketplace == "amazon_error" %} selected{% endif %}>{{ text_status_amazoneu_failed }}</option> 72 <option value="amazon_linked"{% if filter_marketplace == "amazon_linked" %} selected{% endif %}>{{ text_status_amazoneu_linked }}</option> 73 <option value="amazon_not_linked"{% if filter_marketplace == "amazon_not_linked" %} selected{% endif %}>{{ text_status_amazoneu_notlinked }}</option> 74 {% endif %} 75 {% if marketplace_statuses.amazonus %} 76 <option value="amazonus_saved"{% if filter_marketplace == "amazonus_saved" %} selected{% endif %}>{{ text_status_amazonus_saved }}</option> 77 <option value="amazonus_uploaded"{% if filter_marketplace == "amazonus_uploaded" %} selected{% endif %}>{{ text_status_amazonus_processing }}</option> 78 <option value="amazonus_ok"{% if filter_marketplace == "amazonus_ok" %} selected{% endif %}>{{ text_status_amazonus_active }}</option> 79 <option value="amazonus_unlisted"{% if filter_marketplace == "amazonus_unlisted" %} selected{% endif %}>{{ text_status_amazonus_notlisted }}</option> 80 <option value="amazonus_error"{% if filter_marketplace == "amazonus_error" %} selected{% endif %}>{{ text_status_amazonus_failed }}</option> 81 <option value="amazonus_linked"{% if filter_marketplace == "amazonus_linked" %} selected{% endif %}>{{ text_status_amazonus_linked }}</option> 82 <option value="amazonus_not_linked"{% if filter_marketplace == "amazonus_not_linked" %} selected{% endif %}>{{ text_status_amazonus_notlinked }}</option> 83 {% endif %} 84 </select> 85 </div> 86 <div class="form-group"> 87 <label class="control-label">{{ entry_status }}</label> 88 <select name="filter_status" class="form-control"> 89 <option value=""></option> 90 {% if filter_status == '1' %} 91 <option value="1" selected="selected">{{ text_enabled }}</option> 92 {% else %} 93 <option value="1">{{ text_enabled }}</option> 94 {% endif %} 95 {% if filter_status == '0' %} 96 <option value="0" selected="selected">{{ text_disabled }}</option> 97 {% else %} 98 <option value="0">{{ text_disabled }}</option> 99 {% endif %} 100 </select> 101 </div> 102 <div class="form-group"> 103 <label class="control-label" for="filter_category">{{ entry_category }}</label> 104 <select name="filter_category" id="filter_category" class="form-control"> 105 <option value=""></option> 106 <option value="none">{{ text_category_missing }}</option> 107 {% for category in category_list %} 108 <option value="{{ category.category_id }}"{% if filter_category == category.category_id %} selected{% endif %}>{{ category.name }}</option> 109 {% endfor %} 110 </select> 111 </div> 112 </div> 113 <div class="col-sm-4"> 114 <div class="form-group"> 115 <div class="row"> 116 <div class="col-sm-12"> 117 <label class="control-label">{{ entry_stock_range }}</label> 118 </div> 119 </div> 120 <div class="row"> 121 <div class="col-sm-6"> 122 <input type="text" name="filter_quantity" value="{{ filter_quantity }}" class="form-control" placeholder="{{ text_min }}" id="input-quantity" /> 123 </div> 124 <div class="col-sm-6"> 125 <input type="text" name="filter_quantity_to" value="{{ filter_quantity_to }}" class="form-control" placeholder="{{ text_max }}" id="input-quantity-to" /> 126 </div> 127 </div> 128 </div> 129 <div class="form-group"> 130 <div class="row"> 131 <div class="col-sm-12"> 132 <label class="control-label">{{ entry_populated }}</label> 133 </div> 134 </div> 135 <div class="row"> 136 <div class="col-sm-3"> 137 <label class="control-label">{{ entry_sku }}</label> 138 </div> 139 <div class="col-sm-3"> 140 <input type="checkbox" name="filter_sku" id="filter_sku" value="1"{% if filter_sku == 1 %} checked="checked"{% endif %} /> 141 </div> 142 <div class="col-sm-3"> 143 <label class="control-label">{{ entry_description }}</label> 144 </div> 145 <div class="col-sm-3"> 146 <input type="checkbox" name="filter_desc" id="filter_desc" value="1"{% if filter_desc == 1 %} checked="checked"{% endif %}/> 147 </div> 148 </div> 149 </div> 150 <a onclick="filter();" class="btn btn-primary pull-right" data-toggle="tooltip" title="{{ button_filter }}"><i class="fa fa-filter"></i> {{ button_filter }}</a> 151 </div> 152 </div> 153 </div> 154 <form method="post" id="form"> 155 <div class="table-responsive"> 156 <table class="table table-bordered table-hover"> 157 <thead> 158 <tr> 159 <td width="1" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').attr('checked', this.checked);" /></td> 160 <td class="text-center">{{ column_image }}</td> 161 <td class="text-left"> 162 {% if sort == 'pd.name' %} 163 <a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a> 164 {% else %} 165 <a href="{{ sort_name }}">{{ column_name }}</a> 166 {% endif %} 167 </td> 168 <td class="text-left"> 169 {% if sort == 'p.model' %} 170 <a href="{{ sort_model }}" class="{{ order|lower }}">{{ column_model }}</a> 171 {% else %} 172 <a href="{{ sort_model }}">{{ column_model }}</a> 173 {% endif %} 174 </td> 175 <td class="text-left"> 176 {% if sort == 'p.price' %} 177 <a href="{{ sort_price }}" class="{{ order|lower }}">{{ column_price }}</a> 178 {% else %} 179 <a href="{{ sort_price }}">{{ column_price }}</a> 180 {% endif %} 181 </td> 182 <td class="text-right"> 183 {% if sort == 'p.quantity' %} 184 <a href="{{ sort_quantity }}" class="{{ order|lower }}">{{ column_quantity }}</a> 185 {% else %} 186 <a href="{{ sort_quantity }}">{{ column_quantity }}</a> 187 {% endif %} 188 </td> 189 <td class="text-left"> 190 {% if sort == 'p.status' %} 191 <a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a> 192 {% else %} 193 <a href="{{ sort_status }}">{{ column_status }}</a> 194 {% endif %} 195 </td> 196 <td width="230">{{ text_markets }}</td> 197 </tr> 198 </thead> 199 <tbody> 200 {% if products %} 201 {% for product in products %} 202 <tr> 203 <td class="text-center"> 204 <input type="checkbox" name="selected[]" value="{{ product.product_id }}" /> 205 </td> 206 <td class="text-center"> 207 {% if product.image %} 208 <img src="{{ product.image }}" alt="{{ product.name }}" class="img-thumbnail" /> 209 {% else %} 210 <span class="img-thumbnail"><i class="fa fa-camera fa-5x"></i></span> 211 {% endif %} 212 </td> 213 <td class="text-left"><a href="{{ product.edit }}">{{ product.name }}</a></td> 214 <td class="text-left">{{ product.model }}</td> 215 <td class="text-left"> 216 {% if product.special %} 217 <span style="text-decoration: line-through;">{{ product.price }}</span><br/> 218 <div class="text-danger">{{ product.special }}</div> 219 {% else %} 220 {{ product.price }} 221 {% endif %} 222 </td> 223 <td class="text-right"> 224 {% if product.has_option == 0 %} 225 {% if product.quantity <= 0 %} 226 <span class="label label-danger">{{ product.quantity }}</span> 227 {% elseif product.quantity <= 5 %} 228 <span class="label label-warning">{{ product.quantity }}</span> 229 {% else %} 230 <span class="label label-success">{{ product.quantity }}</span> 231 {% endif %} 232 {% else %} 233 <span class="label label-info">{{ product.vCount }} {{ text_variations }}</span><br /> 234 <span class="label label-info">{{ product.vsCount }} {{ text_variations_stock }}</span> 235 {% endif %} 236 </td> 237 <td class="text-left">{{ product.status }}</td> 238 <td> 239 {% for markets in product.markets %} 240 {% if market.status == 1 %} 241 <a href="{{ market.href }}" data-toggle="tooltip" title="{{ market.text }}" class="btn btn-block btn-sm btn-success">{{ market.name }}</a> 242 {% elseif market.status == 2 %} 243 <a href="{{ market.href }}" data-toggle="tooltip" title="{{ market.text }}" class="btn btn-block btn-sm btn-danger">{{ market.name }}</a> 244 {% elseif market.status == 3 %} 245 {% if market.href is not empty %} 246 <a href="{{ market.href }}" data-toggle="tooltip" title="{{ market.text }}" class="btn btn-block btn-sm btn-info">{{ market.name }}</a> 247 {% else %} 248 <a disable="disable" data-toggle="tooltip" title="{{ market.text }}" class="btn btn-info btn-block btn-sm">{{ market.name }}</a> 249 {% endif %} 250 {% else %} 251 <a href="{{ market.href }}" data-toggle="tooltip" title="{{ market.text }}" class="btn btn-block btn-sm btn-default">{{ market.name }}</a> 252 {% endif %} 253 {% endfor %} 254 </td> 255 </tr> 256 {% endfor %} 257 {% else %} 258 <tr> 259 <td class="center" colspan="8">{{ text_no_results }}</td> 260 </tr> 261 {% endif %} 262 </tbody> 263 </table> 264 </div> 265 </form> 266 <div class="row"> 267 <div class="col-sm-6 text-left">{{ pagination }}</div> 268 <div class="col-sm-6 text-right">{{ results }}</div> 269 </div> 270 </div> 271 </div> 272 </div> 273 </div> 274 <script type="text/javascript"><!-- 275 function filter() { 276 url = 'index.php?route=marketplace/openbay/items&user_token={{ user_token }}'; 277 278 var filter_name = $('input[name=\'filter_name\']').val(); 279 280 if (filter_name) { 281 url += '&filter_name=' + encodeURIComponent(filter_name); 282 } 283 284 var filter_model = $('input[name=\'filter_model\']').val(); 285 286 if (filter_model) { 287 url += '&filter_model=' + encodeURIComponent(filter_model); 288 } 289 290 var filter_price = $('input[name=\'filter_price\']').val(); 291 292 if (filter_price) { 293 url += '&filter_price=' + encodeURIComponent(filter_price); 294 } 295 296 var filter_price_to = $('input[name=\'filter_price_to\']').val(); 297 298 if (filter_price) { 299 url += '&filter_price_to=' + encodeURIComponent(filter_price_to); 300 } 301 302 var filter_quantity = $('input[name=\'filter_quantity\']').val(); 303 304 if (filter_quantity) { 305 url += '&filter_quantity=' + encodeURIComponent(filter_quantity); 306 } 307 308 var filter_quantity_to = $('input[name=\'filter_quantity_to\']').val(); 309 310 if (filter_quantity_to) { 311 url += '&filter_quantity_to=' + encodeURIComponent(filter_quantity_to); 312 } 313 314 var filter_status = $('select[name=\'filter_status\']').find(":selected").val(); 315 316 if (filter_status !== '') { 317 url += '&filter_status=' + encodeURIComponent(filter_status); 318 } 319 320 var filter_sku = $('input[name=\'filter_sku\']:checked').val(); 321 322 if (filter_sku) { 323 url += '&filter_sku=' + encodeURIComponent(filter_sku); 324 } 325 326 var filter_desc = $('input[name=\'filter_desc\']:checked').val(); 327 328 if (filter_desc) { 329 url += '&filter_desc=' + encodeURIComponent(filter_desc); 330 } 331 332 var filter_category = $('select[name=\'filter_category\']').find(":selected").val(); 333 334 if (filter_category) { 335 url += '&filter_category=' + encodeURIComponent(filter_category); 336 } 337 338 var filter_manufacturer = $('select[name=\'filter_manufacturer\']').find(":selected").val(); 339 340 if (filter_manufacturer) { 341 url += '&filter_manufacturer=' + encodeURIComponent(filter_manufacturer); 342 } 343 344 var filter_marketplace = $('select[name=\'filter_marketplace\']').find(":selected").val(); 345 346 if (filter_marketplace) { 347 url += '&filter_marketplace=' + encodeURIComponent(filter_marketplace); 348 } 349 350 location = url; 351 } 352 353 $('#button-ebay-bulk').bind('click', function() { 354 var request_data = $('input[name="selected[]"]:checked').serialize(); 355 356 if (request_data != '') { 357 $('#form').attr('action', 'index.php?route=extension/openbay/ebay/createBulk&user_token={{ user_token }}').submit(); 358 } else { 359 alert('{{ error_select_items }}'); 360 } 361 }); 362 //--></script> 363 {{ footer }}