RT Custom Ring Configurator for WooCommerce

By raintech357

0+ active installationsVersion 1.0.0

Let customers build a custom ring by choosing a setting, a diamond, a metal and a ring size, then add both products to the cart as one linked item.

Description

RT Custom Ring Configurator adds a step-by-step ring configurator to your WooCommerce store. Customers choose a ring setting, pick a compatible diamond, then select the metal and ring size. Both products are added to the cart linked together.

Builder steps

  1. Choose a setting.
  2. Choose a diamond, filtered by shape and carat and by the setting’s compatibility.
  3. Pick the metal and ring size.

Features

  • Linked cart items: the setting and the diamond are added together. Metal and ring size show in the cart and on the order.
  • Quantity is locked to 1, and removing one half removes the other.
  • The cart total is the setting price plus the diamond price.
  • Per-product “Ring Configurator role” setting: Ring setting, Diamond or Matching band.
  • Settings can define allowed metals, compatible diamond shapes, and minimum and maximum carat.
  • Diamonds store shape, carat, color, clarity and cut.
  • Global options under WooCommerce > Ring Configurator: ring sizes, default metals, shapes and accent color.
  • Matching band upsell, with a configurable discount percentage.
  • Option to stay on the page after adding to the bag, so you can open your own mini-cart or popup.
  • Developer hooks in JavaScript, jQuery and PHP (see below).

Developer hooks

After a ring is added to the cart, the plugin triggers the following.

JavaScript event:

document.addEventListener('rtrb:added', e => console.log(e.detail));

The event detail contains: setting, diamond, metal, size, group, count.

jQuery event:

$(document.body).on('rtrb_added', (e, detail) => { /* ... */ });

The plugin also fires wc_fragment_refresh and added_to_cart.

PHP action:

add_action('rtrb_ring_added_to_cart', function($group, $setting_id, $diamond_id, $metal, $size){ /* ... */ }, 10, 5);

Matching band events: rtrb:band_added (JavaScript) and the rtrb_band_added_to_cart PHP action.

Installation

  1. Upload the plugin folder to /wp-content/plugins/, or install it via Plugins > Add New > Upload Plugin.
  2. Activate the plugin through the Plugins screen. WooCommerce 6.0 or later must be active.
  3. Edit a product and open the General tab. Set the “Ring Configurator role”:
    • Ring setting: optionally set metals, compatible shapes, and min/max carat.
    • Diamond: fill in shape, carat, color, clarity and cut.
    • Matching band: used for the optional band upsell.
  4. Go to WooCommerce > Ring Configurator and set ring sizes, default metals, shapes and the accent color.
  5. Add the shortcode [rt_ring_builder] to any page.

FAQ

Does this require WooCommerce?

Yes. WooCommerce 6.0 or later is required.

How do I show the ring configurator?

Add the [rt_ring_builder] shortcode to any page or post.

How is the price calculated?

The cart total is the price of the setting plus the price of the diamond.

Can customers change the quantity?

No. Quantity is locked to 1, and removing either the setting or the diamond removes both.

How do I set up the matching band upsell?

Give the band products the role “Matching band”, then set the discount percentage under WooCommerce > Ring Configurator.

Can I open my own mini-cart after adding to the bag?

Yes. Set WooCommerce > Ring Configurator > “After adding to bag” to “Stay on page”, then listen for the rtrb:added event to open your own mini-cart or popup.

Changelog

1.0.0

  • Initial release.