Idea / Feature Request: Template Text for products

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
10 years 11 months ago #134730

-- url of the page with the problem -- : www.waffenmarti.ch/shop
-- HikaShop version -- : HikaShop [1308241414] /
-- Joomla version -- : 2.5.14
-- PHP version -- : 5.3.27
-- Browser(s) name and version -- : 31.0.1650.57 (Official Build 235101)
-- Error-message(debug-mod must be tuned on) -- : None



I would like to place an idea / feature request, that would be nice for future versions of HIKA-Shop.

We have some different kinds of products in our Shop and for the most of them, we have to place a "Statement" like ("You need a permit to buy" or "This product is only sold when... x or y"), statements like that.

These are standard texts and always the same.

It would be nice, if these Texts could be stored as "Template-Texts". If I put a new product to the store, it would be nice to enter the product specific parts like product name, description, size, weight, price, ... etc. and then choose such a Template-Text to be displayed below the product as a standard text.

I know how to solve issue with the custom fields but I would like to do as less as possible custom-changes to the PHP-Scripts of the Shop.

And why a text-template? It's simple. I can put a text to every product by hand and this text ever changes, then I have a problem (since I have to change all products by hand with this text). Otherwise I can change the text-template and it's done for all products.

May I ask you to add such a possibility to one of the next versions of Hika-Shop maybe?

You can see a sample of what i mean here:
www.waffenmarti.ch/shop/pistolen/desert-...rtant_product_notice

This "Wichtige Produktehinweise" ("Important product notice") is coded by myself, but this means a change in the displaying scripts which I want to avoid to make updates easier. I know, that the updates do not overwrite my changes, but if I change a script, then I will not get the latest version of this script unless I'm porting my changes manually to the new version of the script.

Thank you and best regards
Mike

PS.: For further information please message me or post here a note. Thank you very much!

Last edit: 10 years 11 months ago by mike.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #134807

Hi,

What can be done is write something like:

{SAMPLE_TEXT}
And edit the view "product / show_default" and add a replace like:
$this->element->product_description = str_replace('{SAMPLE_TEXT}','Your sample text here.',$this->element->product_description);
Before:
echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$this->element->product_description));

Please Log in or Create an account to join the conversation.

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
10 years 10 months ago #134809

Hello Xavier

I know, that this would be possible when changing the view product / show_default but I would like to avoid that because I started with HIKA-Shop V. 1.6

Some of my changed view scripts have still this version, because I'm not that good in programming PHP and it is extreemly time-consuming if i have to write my changes in every new Hika-Shop Version.

So I thought that it would be a nice feature for further versions of Hika-Shop to build that into the core files.

Best regards
Michael

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum