A REALLY weird problem!

I was working like slave for days adding a bunch of products…



I worked like this…



I cloned the first product and I created the second (with a couple of changes… name, photo etc)



I continued in this way… I cloned, changed some parameters like name, photo etc.





I added in this way many many products!



Today I enter the online store… and instead of the normal names of the products I see names like

product1 [CLONED]

product1 [CLONED] [CLONED]

product1 [CLONED] [CLONED] [CLONED]



I m about to lose myself!!!





How this happened? Did I do something wrong?



In the admin panel I see the normal names I originaly gave but in the store I see wrong names!



If I change parameters like the price, then the change take place in the store front. When I change the Product name:the change cannot be done!





PLEASE HELP!!!

Every time you clone a product it adds the word [Clone] to the end of your product name and the seo name field. You have to delete it before saving it. Looks like now you’ll have to go back into each product and delete that word one by one.

Where is this field? Can you give me a screenshot?



Why previously everything was ok?



I was able to see the products with the given names!



When I go to the “manage products” and I try to edit a product… I see them with the names I gave… and I see nowhere the [clone] tags…





Thanx in advance!

You can also use your database to delte the references. Make a backup of your database first. Download your database as a sql file and open it in Wordpad. You can hen do a find/replace (find: [Clone] replace with: leave this empty) Or you can simply search for that term and delete but if you have a ton of entries do the find/replace. You’ll then have to drop the tables in your database and import the edited one.

That would be nice about the replace…



But the problem is like that…





The frist product was named “ball”



I cloned the “ball”, I renamed it to “doll” and saved it…





THe previous days in the list I could see the “doll” as “doll”…



Now I see it as “Ball [CLONE]” and NOT as “doll [clone]” or something similar…



Even if I edit the DB and try to find/replace… I will end up with empty product names.





Thanx again…



PS: I cannot understand how this happened… I cannot understand why I am SO unlucky… *I touch gold and it converts automatically in ***



Sorry for the asterisks…

i don’t know what this means, because I only use one language, and I am looking through the database of items I have cloned, and in every other language (except english, which I cloned them in) the [clone][clone]…etc shows up and the product number in every other language in the database stays the same as the cloned product.



I don’t know what this means, just an observation.

YEs!



That is the problem!





When I have it in any other language except english… then it shows me the names as cloned!







Thanx man!





But this now generates a new problem… How do i fix it? Is it an encoding problem?





Thanx again!



You are great!

just for fun, i changed the language on my test store (my old one) and voila!







This does not happen in English…

The only way I know how would be Robans way.

Do an SQL Query on the product descriptions database and remove [CLONE]



But, the problem remains, that it will not change the product NAME to the correct one.



Just guessing here, but Maybe all the “available languages” need to be checked as available in your admin Languages page when cloning?



dunno?





EDIT: Nope, making all languages available doesn’t do it…

tried cloning a new product with all languages available

maybe I am missing something

I am totally n00b… so I do not know if my opinion could be even in 1% correct…



Probably the additional languages affect ONLY the translation of the texts,menus etc…



When you submit a product, there is a kind of non-compatibility between the language and database encoding (or something like this?) so it uses a “known” name to show the results?!?!?





No…?

Sounds like this is a query for the developers.

This is a very big problem, has it been solved yet?

Has it been solved yet? How about in 2.0 RC?

The product name (and maybe a couple of other fields, like SEO name, description … IIRC) only get copied to other languages the first time you create a new product.



So when you edit a product you’ve already created (or cloned) the new details you enter are saved only for the language you are using in admin.



And if you clone the clone of a clone … then the other languages will have the [CLONE][CLONE]… tagged on, since they won’t be changed when you edit the product name.



I can see the possible use of this - someone fluent in more than one language may want to enter product names in more than one language. But for most of us, it negates the usefulness of having several languages on the shop for navigation due to the overhead of keeping the product details updated in each additional language.

Support answered me quickly with this;


[quote]In order to get rid of this text from your products names please:

  1. Backup your database in your administration panel.
  2. Insert the following part of code into the “index.php” file located in the root directory of your CS-Cart installation:[/quote]

$prod_array = db_get_hash_array("SELECT product_id, product FROM $db_tables[product_descriptions] WHERE $db_tables[product_descriptions].product LIKE '%[CLONE]%'", 'product_id');
foreach ($prod_array as $id => $data) {
db_update_by_array($db_tables['product_descriptions'], array('product' => str_replace('[CLONE]', '', $data['product'])), 'product_id=\'' . $id . '\'');
}

[quote]under this part:[/quote]

if (file_exists(@$script_targets[$target])) {
include $script_targets[$target];
} else {
fn_set_exception('no_page');
}

$bef = fn_get_microtime();

[quote]Save the file and open the homepage of your store. Roll back the changes in the “index.php” file and check the results.[/quote]



In my case it worked much better than a charm… a 5 minute fix, i hope it works as well for others.

Fleety

Hi Fleety, you and the cs-cart team are the heroes!



Many thanks!!!

There is one problem, this fix doesn’t solve the problem once and for all. It does not fix the clone algorithm. That means you have to do this again after every time you clone products…

you could always put that code in, and wrap them around if statements



like in the config file you could add:



define(“APPLYFIX”,1);



then around the code above you could put



if (defined(“APPLYFIX”)) {



…do the code …



}



then, when you are done running it, you only have to comment out the define line and you’re done…



so rather than having to modify several lines of code everytime, you need to comment/uncomment that 1 line

To anyone following this thread,



a good rule of thumb to observe, (I learned as a result of my own [CLONE] nightmare.) is to use the CSV import and export tools provided in the Backend > Administration box.



We had the product names change just like Joe did… Our mySql backup didn’t restore the product names. (probably human error on my part)



Looking in the database, the English product names for each product ID were all correct.



Because I didn’t know what CSV was, It took me a full 10 minutes to figure out how to export the SKU and English product names to my local computer.



Import the same (English product name) file you just exported selecting the other Languages from the drop down each time. It couldn’t be easier.



Now when we upload a bunch of new products, we export all fields for all of the products and we have our butts covered a second way. The file is so small you can attach it to an email and save it in your drafts, keep 1 on your server whatever.



It’s quick and easy for beginners like me… and it works.



Fleety