<aside> ⚠️

this documentation is under construction

</aside>

Theme-based Carts

  1. Ensure “Order Bonuses” are enabled in the “Giveaway Gator Body Embed” theme embed.

CleanShot 2024-11-01 at 09.49.17@2x.jpg

  1. Add this snippet to your theme cart to render the progress bar.
<div id="gg-order-bonuses-progress"></div>

Using with Slide Cart by Amp

<script>
    window.SLIDECART_LOADED = function(cart) {
      // Fires once the cart has loaded
      // To initialize the progress bar
    	window.ggatorInitializeProgressBar();
    }

    window.SLIDECART_UPDATED = function(cart) {
      // Fires whenevr slide cart has updated
      // To update the progress bar with a new total
    	window.ggatorUpdateProgressBar(cart.items_subtotal_price);
    }
</script>

For more information, see Slide Cart’s docs

Customizing the Order Progress Bar’s Styling

/* Container Styles */
  .gg-order-bonuses-container {
    width: 100%;
    background-color: {{ block.settings.container_background_color }};
    padding: 16px;
    border-radius: {{ block.settings.container_border_radius }}px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, {{ block.settings.shadow_opacity | divided_by: 100.0 }});
    margin-top: 20px;
    margin-bottom: 10px;
    box-sizing: border-box;
  }

  /* Header Container Styles */
  .gg-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }

  /* Title Styles */
  .gg-progress-title {
    font-size: 16px;
    font-weight: 700;
    color: #4a5568;
    margin: 0;
  }

  /* Cart Value Styles */
  .gg-cart-value {
    font-size: 14px;
    color: #2d3748;
    font-weight: 600;
  }

  /* Progress Bar Background */
  .gg-progress-bar-background {
    position: relative;
    padding-top: 4px;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
  }

  /* Progress Bar Fill */
  .gg-progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: {{ block.settings.progress_bar_color }};
    transition: width 0.5s ease;
    white-space: nowrap;
  }

  /* Thresholds Container */
  .gg-thresholds-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: center;
  }

  /* Individual Threshold Badge */
  .gg-threshold-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: {{ block.settings.reward_tag_background_color }};
    color: #2d3748;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
  }

  /* Active Threshold Badge */
  .gg-threshold-badge.active {
    background-color: {{ block.settings.active_reward_tag_background_color }};
    color: {{ block.settings.active_reward_tag_text_color }};
    font-weight: bold;
  }

  /* Next Threshold Message */
  .gg-next-threshold-message {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #2b6cb0;
  }