radykal | Support Center Chooser

For which product do you need support?

Fancy Product Designer Multistep Product Configurator Another

Start a new topic

Text element pricing (removable && length == 0)

Hey. First of all I would like to say thanks very much for this awesome plugin.

Its possible to remove element with Trash button. But other users just delete text in edit mode with keyboard Backspace.
We charge 1$ if user edits default text. BUT if user deletes text with Backspace (leaves empty text field) user is charged extra. It's not fair.

1. I suggest to think and implement this logic (only for string elements):
IF element is removable AND text length == 0 THEN do not charge extra.

2. I have managed to add this logic to JS code in if(element.chargeAfterEditing) file FancyProductDesigner.js line ~5900: 

 But how to add same IF in my own JS file? I have hooked into Trigger elementModify but can't get instance (see attached picture).

if (element.removable && text.length == 0 && element._isPriced){
instance.changePrice(element.price, '-');
element._isPriced = false;
}
Login or Signup to post a comment