When you clone something ... you need to change a word or value to make a clone ...
For example, if you want to clone specials ... then you would change all occurances of the word:
specials
to a new word:
freds
now ever file that exists with the word:
specials
would be made and use the word:
freds
and file that referrences the word:
specials
would get a copy of that code but the copy would have the word:
specials
changed to:
freds
Another way to do this is to change the word to something new or related to what you are trying to build ...
In your case, you wanted to clone Featured to something new ...
1 You could search in the Tools ... Developers Tool Kit ... for the word:
featured
2 sort which files are used by Featured Products - these will usually start with the word:
featured
and which files reference the Featured Products - these files will usually contain code that references variables, constants and filenames that contain the word:
featured -- or -- FEATURED
Example:
Code:
$featured_products_split = new splitPageResults($featured_products_query_raw, MAX_DISPLAY_PRODUCTS_FEATURED_PRODUCTS);
You need to follow one set of files/variables/constants and stick with it when cloning to make an identical set of everything but change the keyword to the code ...
One thing you can also do is add to the "keyword" when you clone:
"featured" becomes ...
featured2
featuredmine
featureddaily
featuredclone
featureddozen
This means that later, I can do a search in the Developers Tool Kit on:
featured
and should fine a match for everything to know that nothing was missed ...
But you cannot start with one set of code and then switch to another set of code and think that this is going to work ...
Bookmarks