Advertisement
VictorMisa

Filtro de productos de amazon usando awwp

Nov 3rd, 2020
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. <p style="text-align:center; font-size:20px; font-weight:bold;">¿Cuánto te quieres gastar?:</p>
  2. <form action="xxxxxx.com#Las_6_mejores_maquinas_depiladoras_de_cejas" method="post">
  3. <output class="value" id="range_weight_disp">40 €</output></p>
  4. <input type="range" name="preciofor" id="range_weight" value="40" step="10" min="20" max="200" oninput="range_weight_disp.value = range_weight.value">
  5. <div class="inner-button"><input style="margin-top:15px" class="comparador-button" type="submit" name="totalpro" value="Filtro por precio" /></div>
  6. </form></p>
  7. <script>
  8. var elem = document.querySelector('input[type="range"]');
  9. var rangeValue = function(){
  10. var newValue = elem.value;
  11. var target = document.querySelector('.value');
  12. target.innerHTML = newValue + "€";
  13. }
  14. elem.addEventListener("input", rangeValue);
  15. </script>
  16.  
  17.  
  18. <?php
  19. $precio = $_POST["preciofor"];
  20. $total = $_POST["totalpro"];
  21. if ($total == "")
  22. {
  23. $total = 6;
  24. }
  25.  
  26. ?>
  27. <?php if($total== "6"){ ?>
  28.  
  29. [aawp box="B07WDGS1ZJ,B07WPGYLT1,B0894RWG32,B08B81K1Q8,B08DXMC2JD" filterby="price" filter="<?php echo $precio; ?>" description_items="3" rating="<?php echo rand(4, 5); ?>" orderby="rating" filter_compare="less" image_size="medium" template="table"]
  30. <?php }else{ ?>
  31.  
  32. [aawp box="xxxxxxxx" orderby="rating" filterby="price" image_size="medium" filter="<?php echo $precio; ?>" rating="<?php echo rand(4, 5); ?>" filter_compare="less" template="table"]
  33.  
  34. <?php }?>
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement