DYNAMIC BULK ADD TO CART

Dynamic Bulk Add To Cart Overview

USAGE & SCOPE

This widget must be placed on the template of the Parent item in a JetEngine relation setup.

Example Structure:

The widget will pull product IDs defined as Child items in the relation and add them to the cart in a single action. The quantity for each added product will always be 1 by default.

Additionally, you can manually define products instead of using a relation. In that case, set the source to Manual and provide product IDs and quantities directly.


DESCRIPTION

The Dynamic Bulk Add To Cart widget is a unique tool designed to handle bulk product additions to the cart based on a JetEngine relation setup. If the relation has products set as child items, the widget will fetch those products and add them to the cart as a single action.

In manual mode, you can define a custom set of products and their respective quantities using a repeater field or a structured meta field.


USAGE INSTRUCTIONS

1. Create a JetEngine Relation

In the JetEngine settings, set up a new relation:

2. Assign Products to the Parent CPT

Open the parent CPT item and assign one or more products as related child items using the relation field.

3. Get the Relation ID

The relation ID can be found in the URL when editing the relation:

/wp-admin/admin.php?page=jet-engine-relations&cpt_relation_action=edit&id=2

4. Configure the Widget

Go to the template editor for the parent CPT (e.g., Single Event Template) and add the Dynamic Bulk Add To Cart widget. Set the relation ID and define the redirect location (Cart or Checkout).


WIDGET SETTINGS


EXAMPLE USAGE

Relation-Based Example:

In this scenario, we have an Event CPT with related products (child items). The widget is placed within the Event template and configured to pull products based on the relation ID.

Manual Example:

If the source is set to Manual, the repeater field will allow the entry of multiple product IDs and their respective quantities. The button will then add these products to the cart with a quantity of 1 or the specified amount.


TIPS & BEST PRACTICES