sparkweb

FoxyShop: Subscription as a Variation Setup

Jan 17th, 2012
1,299
0
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.73 KB | None | 0 0
  1. //This is a way to allow your customers to select their subscription frequency
  2. //Create a dropdown variation called "Delivery Frequency" and then create a hidden input as seen below for each of the entries
  3. //This code goes in foxyshop-single-product.php before the end of the form
  4.  
  5. //CUSTOM SUBSCRIPTION CODE HERE
  6. echo '<input type="hidden" name="x:sub_frequency1" id="frequency_holder1_' . $product['id'] . '" value="sub_frequency' . foxyshop_get_verification("sub_frequency", "1m") . '" />'."\n";
  7. echo '<input type="hidden" name="x:sub_frequency2" id="frequency_holder2_' . $product['id'] . '" value="sub_frequency' . foxyshop_get_verification("sub_frequency", "2m") . '" />'."\n";
  8. echo '<input type="hidden" name="x:sub_frequency3" id="frequency_holder3_' . $product['id'] . '" value="sub_frequency' . foxyshop_get_verification("sub_frequency", "3m") . '" />'."\n";
  9.  
  10. //Writes Javascript
  11. ?>
  12. <script type="text/javascript">
  13. jQuery(document).ready(function($) {
  14.     $("select.variation-delivery-frequency").bind("change ready", function() {
  15.         var currentval = $(this).prop("selectedIndex");
  16.         var product_id = $(this).parents("form").attr("id");
  17.         product_id = product_id.replace("foxyshop_product_form_","");
  18.         setFrequency(currentval, product_id);
  19.     });
  20.     function setFrequency(fr, product_id) {
  21.         fr++;
  22.         $("#fs_sub_frequency_" + product_id).val(fr+"m").attr("name",$("#frequency_holder" + fr + "_" + product_id).val());
  23.     }
  24.     //Run on Initialization
  25.     $("select.variation-delivery-frequency").each(function() {
  26.         var currentval = $(this).prop("selectedIndex");
  27.         var product_id = $(this).parents("form").attr("id");
  28.         product_id = product_id.replace("foxyshop_product_form_","");
  29.         setFrequency(currentval, product_id);
  30.     });
  31. });
  32. </script>
  33. <?php
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • Mirzevin
    140 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment