Log message #4182657

# At Username Text
# Apr 9th 2019, 09:28 spriz I actually drafted exactly what’s in your post, and did not really see benefit of adding the plugin so I think I’ll just stick with that )
# Apr 9th 2019, 09:26 dereuromark well, I like the entity based system best. but sure, you can also look into those ways of doing it.
# Apr 9th 2019, 09:25 spriz I was wondering if we should just jump into https://github.com/CakeDC/Enum with the to make sure we don’t recreate magic - but we’d use “Const Configuration” so I’ll have to check what benefit that plugin adds :slightly_smiling_face:
# Apr 9th 2019, 09:25 dereuromark => https://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/ => for 3.x (incl bake template support and stuff possible)
# Apr 9th 2019, 09:25 dereuromark they can still be translated, and you can always use subsets in forms (e.g. user vs admin backend)
# Apr 9th 2019, 09:24 spriz @dereuromark what do you mean by semi-static? ,:(
# Apr 9th 2019, 09:23 spriz It is - it’s our “own” SAAS with single db and single app :slightly_smiling_face:
# Apr 9th 2019, 09:23 dereuromark if hardcoding in code is an option at least.
# Apr 9th 2019, 09:23 spriz Yeah, I’ll try it out with wiuthout the type table just to see if it’s worth the increased complexity - it’s not like we’ll add types every month from some UI anyway. In the past we’ve always made `_type` tables but we’ve never really added anything in those without also changing code anyway for this new type :P
# Apr 9th 2019, 09:23 rogerpro I’m more about normalizing in tables
# Apr 9th 2019, 09:23 dereuromark spriz: I use semi-static enums in these cases :slightly_smiling_face: The perfect mixture of easy to change, super-fast and lightweight.
# Apr 9th 2019, 09:22 neon1024 I sometimes set static config maps using `Configure::write()`
# Apr 9th 2019, 09:22 rogerpro with `id`, `source_product_id`, related_product_id`, `related_product_type_id`, `created`, `modified`, `deleted`
# Apr 9th 2019, 09:22 neon1024 Or set a const
# Apr 9th 2019, 09:22 spriz I’m actually thinking of just using a enum/string rather than creating another type table :slightly_smiling_face:
# Apr 9th 2019, 09:22 neon1024 I mean you could use an ENUM type thing, but normalising the association is probably better
# Apr 9th 2019, 09:21 rogerpro ah ok so yes then I would create a `related_product_types` table
# Apr 9th 2019, 09:19 spriz I’ll have more actually @rogerpro :slightly_smiling_face: `alternative`, `replacement`, `related´, `often_bought_with` etc
# Apr 9th 2019, 09:18 rogerpro @neon1024 I understood @spriz is going to have only 1 product association type (“alternative product”) so why is association_type_id for?
# Apr 9th 2019, 08:42 palak.vasani25 I believe CakePHP doesn't support namespace
# Apr 9th 2019, 08:41 palak.vasani25 Hi Everyone, I am trying to integrate Razorpay with Cakephp 2. Can anyone help me to place Razorphp SDK in proper place with CakePHP Structure and use it
# Apr 9th 2019, 08:31 dereuromark why not Form->text() etc then? those produce nothing else. ->control() sure does add the div.
# Apr 9th 2019, 08:18 conehead I only need the input tag and nothing else. But the template is used for this. And it contains a div around it which will still be rendered
# Apr 9th 2019, 07:58 admad Form->hidden() would just generate the input tag nothing else, so you actually went in the opposite direction to achieve want you want
# Apr 9th 2019, 07:58 conehead @admad ah thanks. already tried that. Had to change from Form->hidden to Form->control to get it to work
# Apr 9th 2019, 07:58 admad @conehead use the 'template' key in options to override required template(s)
# Apr 9th 2019, 07:58 admad cast your votes guys https://github.com/cakephp/cakephp/issues/13103 :slightly_smiling_face:
# Apr 9th 2019, 07:43 conehead is it possible to disable a form template for a single field? I get several divs around an hidden field :S
# Apr 9th 2019, 07:24 spriz that’s a good #dislacimer
# Apr 9th 2019, 07:24 spriz :,)
# Apr 9th 2019, 07:24 neon1024 I will qualify it that I’ve just arrived at work and haven’t had a coffee yet! :P
# Apr 9th 2019, 07:24 spriz Yeah, I think I will :slightly_smiling_face:
# Apr 9th 2019, 07:24 spriz I’ll explore youre idea and check pros and cons though
# Apr 9th 2019, 07:24 neon1024 Give it a go in a branch perhaps and bake some stuff, see how you like it
# Apr 9th 2019, 07:23 spriz Just `Products BelongsToMany Products through RelatedProducts` - same same though
# Apr 9th 2019, 07:23 spriz That was my original idea
# Apr 9th 2019, 07:23 neon1024 ..and the store the association type in the join table? :man-shrugging:
# Apr 9th 2019, 07:23 neon1024 Perhaps Products hasAndBelongsToMany Products Through AssociatedProducts
# Apr 9th 2019, 07:22 neon1024 Or maybe I’m wrong. Perhaps you just want a hasAndBelongsToMany Through
# Apr 9th 2019, 07:22 neon1024 Perhaps I explained it badly! :P
# Apr 9th 2019, 07:22 neon1024 That’s the many-to-many part, so you can have the products to choose from :slightly_smiling_face: