Soon, we’ll be announcing a fresh new marketplace for TastyIgniter developers.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[Not Solved] Chained Options

#1 ianhaney Offline Junior Member
Hi

Is it possible to have chained options in tastyigniter v2.1.1 so for example based on pizza size I want to hide/show some other options values, for example if a person selects a pizza size of 10", the extra topping prices will be £0.70, if a person selects 13" pizza size, the extra toppings price will be £0.80, if a person selects 15", the extra toppings price will be £1.50, if a person selects 20", the extra toppings price will be £2.00

It will be similar to how just eat do it but am unsure how to do it in tastyigniter coding

Is that possible?

Thank you in advance
#2 Tanbir Offline Junior Member
I too am looking for a way to do this. If anyone knows please message me!
#3 ianhaney Offline Junior Member
Hi

I found a developer on peopleperhour website who did it for me, I am not 100% sure what coding they did to get it work but I found this at the bottom of the footer.php file in the partials folder

Code:
<script>
  $(document).ready(function(){
      $('body').on('click', '.menu-options .radio label, .menu-options .checkbox label', function(){
          if ($('#topping_price').length==0) {
              $('input[name="menu_id"]').after('<input type="hidden" id="topping_price" name="topping_price" value="0.7"/>');
              $('input[name="menu_id"]').after('<input type="hidden" id="se_price" name="se_price" value="1"/>');
          }
          var str = $(this).text();
          if (str.indexOf('(13")') >= 0) {
              $('#Extra_Toppings .checkbox input[type="checkbox"]').attr('price', '£0.80');
              $('#Extra_Toppings .checkbox span.price').html('£0.80');
              $('#topping_price').val('0.8');
              $('#se_price').val('2.0');
              $('#Stuffed_Edge_Options .radio input[type="radio"]').attr('price', '£2.00');
              $('#Stuffed_Edge_Options .radio span.price').html('£2.00');
          }
          else if (str.indexOf('(15")') >= 0) {
              $('#Extra_Toppings .checkbox input[type="checkbox"]').attr('price', '£1.50');
              $('#Extra_Toppings .checkbox span.price').html('£1.50');
              $('#topping_price').val('1.5');
              $('#se_price').val('2.5');
              $('#Stuffed_Edge_Options .radio input[type="radio"]').attr('price', '£2.50');
              $('#Stuffed_Edge_Options .radio span.price').html('£2.50');
          }
          else if (str.indexOf('(20")') >= 0) {
              $('#Extra_Toppings .checkbox input[type="checkbox"]').attr('price', '£2.00');
              $('#Extra_Toppings .checkbox span.price').html('£2.00');
              $('#topping_price').val('2.0');
              $('#se_price').val('3.0');
              $('#Stuffed_Edge_Options .radio input[type="radio"]').attr('price', '£3.00');
              $('#Stuffed_Edge_Options .radio span.price').html('£3.00');
          }
          else if (str.indexOf('(22")') >= 0) {
              $('#Extra_Toppings .checkbox input[type="checkbox"]').attr('price', '£2.00');
              $('#Extra_Toppings .checkbox span.price').html('£2.00');
              $('#topping_price').val('2.0');
              $('#se_price').val('3.5');
              $('#Stuffed_Edge_Options .radio input[type="radio"]').attr('price', '£3.50');
              $('#Stuffed_Edge_Options .radio span.price').html('£3.50');
          }
          else if (str.indexOf('(10")') >= 0) {
              $('#Extra_Toppings .checkbox input[type="checkbox"]').attr('price', '£0.70');
              $('#Extra_Toppings .checkbox span.price').html('£0.70');
              $('#topping_price').val('0.7');
              $('#se_price').val('1.0');
              $('#Stuffed_Edge_Options .radio input[type="radio"]').attr('price', '£1.00');
              $('#Stuffed_Edge_Options .radio span.price').html('£1.00');
              $('#Stuffed_Edge_Options .radio:eq(4)').hide();
          }
      });
  });
</script>
#4 Tanbir Offline Junior Member
Would you happen to have contact information?
#5 ianhaney Offline Junior Member
I'll ask them if is ok and will send over their skype info as they are in Pakistan

Their skype is username is humayun.ehtisham1. I highly recommend him
#6 David12 Offline Junior Member
Hi! How much he charged you?
#7 ianhaney Offline Junior Member
Hi, think I paid £50 for the work

Possibly Related Threads...

Thread / Author
Forum Jump:

Users browsing this thread: 1 Guest(s)