Instead of directly add cms block to category description, how to add programmatically?

  • Can you please be more specific? if what i am reading is correct you would need to create a module with a InstallData or a patch file which should allow you to update the descriptions of categories with a single / multiple static blocks if the category IDs are specified. – Dava Gordon Jan 27 at 16:45
  • Actually i want to change my category description cms block based on layered navigation attributes selection, eg. If customer choose color red my category description set cms static block id : 10, if my customer choose color green my category description set cms block id : 11 – zus Jan 27 at 16:49
  • If this is the case you will need to a custom module which gets the current active filters and change the block content using ajax. – Dava Gordon Jan 27 at 16:51
  • I want to change category description dynamically, by default magebto has option for adding cms block under category description, i need to set the cms block based on selection of layered navigation atributes, i hope you understand my point, sorry for my english. – zus Jan 27 at 16:51
  • Yes i understand the requirements but you will need to map the cms blocks to the attribute option values and return the content to the page using ajax. if you loaded all the content on initial load this would cause page speed issues. – Dava Gordon Jan 27 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.