Jump to content

change some character of product name when add new product


AmirMahmood

Recommended Posts

Hi

first sorry for my bad English.

Is there a way to change some character of product name when the new product submitted?

for example, replace all 'Z' with 'z' in the new product name.

in other words, i need to know which PHP file or function get new product informations such as product name to save on DB.

for more detail, i need this feature because my products names have Persian characters. some of my co-workers have Arabic keyboard and "ی"  in Persian has different code with "ي" in Arabic. so some product written with Arabic chars and some with Persian chars. and it cause many problems in search module and ... .

Thanks.

Link to comment
Share on other sites


You can change showing the name in product page by editing your_theme/product.tpl file and changing any apearance of {$product->name} to {if $product->new}{$product->name|replace:'Z':'z'}{else}{$product->name}{/if}

or if You make changes in product-list.tpl (category list) then change {$product->name} to {if $product.new}{$product.name|replace:'Z':'z'}{else}{$product.name {/if}

Edited by hakeryk2 (see edit history)
Link to comment
Share on other sites

31 minutes ago, hakeryk2 said:


You can change showing the name in product page by editing your_theme/product.tpl file and changing any apearance of {$product->name} to {if $product->new}{$product->name|replace:'Z':'z'}{else}{$product->name}{/if}

or if You make changes in product-list.tpl (category list) then change {$product->name} to {if $product.new}{$product.name|replace:'Z':'z'}{else}{$product.name {/if}

thanks for your answer, but the problem is not about showing the name in website.

difference between arabic and persian character - that i said in first post - causes that search field in my site do not work properly.

for example, my product name is "فوي" but when user type "فوی" this product does not load in search result. because "ي" and "ی" have different code. (i think this can make problem with google search too) .

i need to replace characters when new product submitted in back office. Replace "ي" to "ی" .

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...