Spinbox Posted August 5, 2024 Share Posted August 5, 2024 Hi @kongondo, I have a repeaterfield on my product template. When I enable product variants the JS for InputfieldRepeater will trigger based on 'InputfieldRepeaterItem' class, causing errors and the variant's content gets hidden. InputfieldPadloperRuntimeMarkup.module // @note @kongondo: we need this class 'InputfieldRepeaterItem' so InputfieldImage.js will read the ajax postUrl from our data-editUrl here $wrap->addClass('InputfieldPadloperRuntimeMarkupItem InputfieldNoFocus InputfieldRepeaterItem'); You have any ideas to prevent this? (I'd rather not change Fieldtype Repeater module itself, which I have done in the meanwhile) 1 Link to comment Share on other sites More sharing options...
kongondo Posted August 10, 2024 Share Posted August 10, 2024 Hi @Spinbox, This has been reported before but I have never found a solution. On 8/5/2024 at 2:53 PM, Spinbox said: InputfieldPadloperRuntimeMarkup.module This is a runtime field used by Padloper in various places to embed editable content from other sources in the current page edit. E.g. in the case of products, to load variants. Without 'InputfieldRepeaterItem' class uploading variant images does not work, i.e. they show up but do not get saved and just disappear. I'll ask Ryan for his thoughts. 1 Link to comment Share on other sites More sharing options...
marie.mdna Posted July 16 Share Posted July 16 Hi @kongondo, I am replying here (but will also do in github for coherence), but thanks to the deepwiki I might have found a simple fix while trying to add repeaters do enhance products on frontend and ended up seeing this same issue. There would be something simple to add into InputfieldPWCommerceRuntimeMarkup.module: // in protected function buildForm($pages, $isNew = false, $cnt = 0) // around line 486 // replace the original $wrap->addClass('InputfieldPWCommerceRuntimeMarkupItem.... // $wrap->addClass('InputfieldPWCommerceRuntimeMarkupItem InputfieldNoFocus InputfieldRepeaterItem'); $classes = 'InputfieldPWCommerceRuntimeMarkupItem InputfieldNoFocus'; // Only add InputfieldRepeaterItem if no actual repeater fields exist on template if (!$this->templateHasRepeaterFields()) { $classes .= ' InputfieldRepeaterItem'; } $wrap->addClass($classes); Helper: // around line 1190 private function templateHasRepeaterFields() { $template = $this->page->template; foreach($template->fieldgroup as $field) { if($field->type instanceof FieldtypeRepeater) { return true; } } return false; } Hope it helps! 1 Link to comment Share on other sites More sharing options...
kongondo Posted July 16 Share Posted July 16 8 hours ago, marie.mdna said: I am replying here (but will also do in github for coherence), but thanks to the deepwiki I might have found a simple fix while trying to add repeaters do enhance products on frontend and ended up seeing this same issue. Hi @marie.mdna, Nice! Thanks for the suggested fix. Did you test with uploading images to product variants? Do they save OK? That has always been the issue. Thanks. Link to comment Share on other sites More sharing options...
marie.mdna Posted July 18 Share Posted July 18 On 7/16/2025 at 11:19 PM, kongondo said: Did you test with uploading images to product variants? Do they save OK? That has always been the issue. @kongondo Yes! 🙂 I've added/removed/edited images within the variants and it all seems to save perfectly! 1 Link to comment Share on other sites More sharing options...
kongondo Posted August 24 Share Posted August 24 Hi @marie.mdna, Sorry for the delay. Thanks for confirming. I'll test and merge sometime this week. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now