Jump to content

ssneck

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Location
    Ukraine
  • Activity
    Project Owner

ssneck's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. this is my blockcurrencies.tpl <!-- Block currencies module --> <dl id="currencies_block_top" class="{if isset($istopbar) && $istopbar}{if isset($currencies_position) && $currencies_position} pull-right{else} pull-left{/if}{/if} dropdown_wrap"> <dt class="dropdown_tri"> <div class="dropdown_tri_inner"> {if $display_sign!=1}{$blockcurrencies_sign} {/if}{if $display_sign!=2}{foreach from=$currencies key=k item=f_currency}{if $cookie->id_currency == $f_currency.id_currency}{$f_currency.iso_code}{/if}{/foreach}{/if}{if count($currencies) > 1}<b></b>{/if} </div> </dt> {if count($currencies) > 1} <dd class="dropdown_list"> <form id="setCurrency" action="{$request_uri}" method="post"> <ul> {foreach from=$currencies key=k item=f_currency} {if $cookie->id_currency != $f_currency.id_currency} <li> <a href="javascript:setCurrency({$f_currency.id_currency});" title="{$f_currency.name}" rel="nofollow">{if $display_sign!=1}{$f_currency.sign} {/if}{if $display_sign!=2}{$f_currency.iso_code}{/if}</a> </li> {/if} {/foreach} </ul> <input type="hidden" name="id_currency" id="id_currency" value=""/> <input type="hidden" name="SubmitCurrency" value="" /> </form> </dd> {/if} </dl> <!-- /Block currencies module -->
  2. Hi! Please help me to hide certain currency from currency block module. Picture is attached. The currency must be activated in BackOffice because it is used by local payment gateway, but in same time this currency (with id=4) must be hiden on the FrontOffice becaues it doesn't make sense for buyers. So I cannot just disable or delete this currency. I beleive I have to modify blockcurrencies.tpl in currency module to not allow to appear this currency on the site. For example: {IF currency.id=4}{hide-this-row-from-block} {/if} (I hope you understand what i mean ) Can anyone help me, how to modify .tpl? Thanks in advance.
  3. Answer to my question If you want to use certain feature as variable in you product description you need to put code to ProductController.php as described here by Adolphemattos in post #6 and then put this code: if (isset($this->product)){ $feature_var = $features_by_key[1]['value']; $this->product->description=str_replace("{FEATURE_VAR}","{$feature_var}","{$this->product->description}"); } right before this line: $this->setTemplate(_PS_THEME_DIR_.'product.tpl'); now you can write {FEATURE_VAR} in product description and in fron office it will show feature with id1.
  4. Answer to my question If you want to use certain feature as variable in you product description you need to put code to ProductController.php as described Adolphemattos in post #6 and then put this code: if (isset($this->product)){ $feature_var = $features_by_key[1]['value']; $this->product->description=str_replace("{FEATURE_VAR}","{$feature_var}","{$this->product->description}"); } right before this line: $this->setTemplate(_PS_THEME_DIR_.'product.tpl'); now you can write {FEATURE_VAR} in product description and in front office it will show feature with id1.
  5. Hi guys! I used Vekia instruction in this thread to use my variable in product description. Thanks very much for this code! At this moment I can put my {MY_VARIABLE} to product description (via html editor) and it will show default product category. I used this code in ProductController.php and it work good for me! if (isset($this->product)){ $this->product->description=str_replace("{MY_VARIABLE}",($this->category->name),"{$this->product->description}"); } Can you please help me to do the same thing but with certain product Feature Value? In used code from this this topic, but it only help to use feature value variable which I can put only to .tpl file. But I need to use certain features value variables via html editor in product description. I'm not a coder and do not know how it can be done correctly, but I'm believe it possible. I need create same product descriptions where different words are features values. I want only set needed feature values for this product and in description will be shown these words automatically. I have big quantity of products and all time I need to add new products. Copy / paste work make me crazy )) Please help me to get correct code, if you can). Thank you in advance! )
  6. Hi adolphemattos! Your code was very helpful for me thanks! Can you please help me? I need to use Category Name and Feature Value variables in a Product description. I added code to ProductController.php as described here for CMS page (thanks vekia) My code in ProductController.php: if (isset($this->product)){ $this->product->description=str_replace("{MY_VARIABLE}",($this->category->name),"{$this->product->description}"); } It work good and now I can put {MY_VARIABLE} to product description (backend html editor) and it will show default category name. As for Feature Values, I made everything as you described in your previous post, now I can put {$features_by_key.3.value} to .tpl and it will show feature value with needed id. But how I can put Feature Variable to html Product Description? Will it possible to do it by same way as I did it for Category name? If yes, could you please help me to create new code to put it to ProductController.php? PS. I'm not coder and tried to play with your code and with no luck, now it make me crazy... please help me if you can )
×
×
  • Create New...