Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted August 17, 20213 yr We have a custom block calling a FAQ block under the product details in one of the the product category. Now we are adding another category of product and same FAQ block showing under that category too, which we don't want. Is there any anyway we can call FAQ custom block inside the product page from ACP - Products - Store Display - Description (WSIWYG editor)?
August 17, 20213 yr Not within the core platform unfortunately, as blocks show on page types, rather than specific pages. So for example, if you add a block to a topic page, it will show on all topic pages. The same applies to products.
August 17, 20213 yr Author Thanks Marc, I understand that functionality. What I mean is to call html or php code to call that FAQ custom block code in Source of relevant product. Like here:
August 17, 20213 yr 27 minutes ago, Gauravk said: Thanks Marc, I understand that functionality. What I mean is to call html or php code to call that FAQ custom block code in Source of relevant product. Like here: I have spoken to one of our developers who will see what is possible and respond at some point later today. As block items are subject to caching, this is something that needs thinking about
August 18, 20213 yr Author Happy to pay other coders for this code edit to call custom block (1 FAQ) block in selective products only.
August 18, 20213 yr You could switch from the WYSIWYG block to a PHP block and wrap the output into a condition like Quote {{if \IPS\Request::i()->id == X}} my output {{else if \IPS\Request::i()->id == Y}} my output for the other product {{endif}}
August 18, 20213 yr Author Thanks @Daniel F for the help. Can you please help with actual condition to be placed in PHP block for the FAQ block at the bottom? https://carnity.com/store/product/66-desert-driving-masterclass I tried this way inserting block as advised in backend but it didn't work
August 21, 20213 yr Looks like that template code was not placed in an executable space. Was this placed in the WYSIWYG editor? I'm afraid, it will not execute there and will need to be placed in a template.
August 21, 20213 yr Author 35 minutes ago, Jim M said: Looks like that template code was not placed in an executable space. Was this placed in the WYSIWYG editor? I'm afraid, it will not execute there and will need to be placed in a template. It was indeed place in a source tab and not in WYSIWYG. Appreciate if you and your team can guide, find, or design an easy usable workaround for this issue please.
August 21, 20213 yr 10 minutes ago, Gauravk said: It was indeed place in a source tab and not in WYSIWYG. Appreciate if you and your team can guide, find, or design an easy usable workaround for this issue please. Source tab in the editor would still not work as it is still the editor, not a template.
August 21, 20213 yr Author 1 minute ago, Jim M said: Source tab in the editor would still not work as it is still the editor, not a template. Thank you I have realized that. Can you please advise, how to make it work?
August 21, 20213 yr Just now, Gauravk said: Thank you I have realized that. Can you please advise, how to make it work? You would need to place this in an area which can execute template code as Daniel instructed with either putting it in a PHP block or a theme template. This is getting outside of our support so I will move this topic to the community support forum.
August 21, 20213 yr Author As usual - Totally and extremely disappointed with IPS Product, IPS support, IPS logical reasonings and problem solving. If such bug or badly design features without a grain of common sense fall outside the support, then why we ask to waste time on tickets (first) then forum to waste customer 5 days time and still make their site looks like a joke in public.
August 21, 20213 yr Author Please change this to Sell virtually - ONLY ONE TYPE OF PRODUCT. https://invisioncommunity.com/features/commerce/ Because WYSIWYG under product listing will show ONLY ONE TYPE OF BLOCK in all products from selling milk to space shuttle to needle to baby toys.