Advertisement
bananamariap

order.js

Jun 18th, 2021
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1.  
  2. $('.image_click').click(function () {
  3. var image_name=$(this).data("img-name");
  4. // var product_guid = $(this).closest('.food-item').find(".add-to-cart").data("product_guid");
  5. var url = "img/food/large_800/"+image_name;
  6.  
  7. //alert("clicked")
  8. //var foodName = $(this).siblings('.title').html();
  9. //var image = $(this).siblings('img').attr('src');
  10. //var description = $(this).siblings('.description').html();
  11. //var startingPrice = $(this).closest('.food-item').data('price');
  12. //var product_guid = $(this).data("product_guid");
  13. //var foodType = $(this).closest('.tabcontent').attr('id');
  14.  
  15. ////get pricing options
  16. //var foodId = $(this).closest('.food-item').data('id');
  17. //var modalSelect = $('#' + foodType + '-modal').find('.mandatory-selections .selection select');
  18. //var options = food[foodType][foodId].prices;
  19. //modalSelect.empty();
  20. //options.forEach(function (option) {
  21. // modalSelect.append('<option value="' + option.price + '" data-topping_number="' + option.web_topping_group_product_number + '" data-product_guid="' + option.product_guid + '">' + option.name + '</option>');
  22. //});
  23.  
  24. //if (options.length < 2) {
  25. // modalSelect.remove();
  26. //}
  27.  
  28. //$('#' + foodType + '-modal').find('.title').first().html(foodName);
  29. //$('#' + foodType + '-modal').find('.description').html(description);
  30. //$('#' + foodType + '-modal').find('.food-main-image').attr('src', image);
  31. //$('#' + foodType + '-modal').find('.total strong').html('€' + startingPrice);
  32.  
  33. //$('#' + foodType + '-modal').attr('data-price', startingPrice);
  34. //$('#' + foodType + '-modal').attr('data-baseprice', startingPrice);
  35. //$('#' + foodType + '-modal').attr('data-product_guid', product_guid);
  36.  
  37. //////reset checkboxes
  38. ////$('#' + foodType + '-modal').find('.choices .choice').each(function () {
  39. //// $(this).find('input').prop("checked", false);
  40. ////});
  41.  
  42. ////reset checkboxes
  43. //$('#' + foodType + '-modal').find('.choices .choice .topping').each(function () {
  44. // Reset_Single_Topping($(this));
  45. //});
  46.  
  47.  
  48.  
  49. ////reset quantity
  50. //$('#' + foodType + '-modal').find('.quantity').attr("value", 1);
  51.  
  52. ////reset comments
  53. //$('#' + foodType + '-modal').find('textarea').val("");
  54.  
  55. //updateExtraSelectionPrices(1);
  56. //Validate_Minimum_Order();
  57.  
  58.  
  59. //var largeImage = document.getElementById('largeImage');
  60. //largeImage.style.display = 'block';
  61. //largeImage.style.width=200+"px";
  62. //largeImage.style.height=200+"px";
  63. //var url=largeImage.getAttribute('src');
  64.  
  65. var h=800;
  66. var w=800;
  67.  
  68. const y = window.top.outerHeight / 2 + window.top.screenY - ( h / 2);
  69. const x = window.top.outerWidth / 2 + window.top.screenX - ( w / 2);
  70. window.open(url, 'Image', `toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${w}, height=${h}, top=${y}, left=${x}`);
  71.  
  72.  
  73.  
  74. //window.open(url,'Image','width=800px,height=800px,resizable=1');
  75.  
  76.  
  77. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement