Zen Cart Logo
Forums / General Questions / Product title made up from categories - please help!

Product title made up from categories - please help!

Locked

Views: 1,382

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
24 Sep 2008, 5:27 PM
#1
rpain avatar

rpain

Zen Follower

Join Date:
Mar 2005
Location:
Watford, UK
Posts:
146
Plugin Contributions:
0

Product title made up from categories - please help!

http://www. woolmer .c o.uk/index.php (remove spaces which are there to prevent search engines linking to here when that web address is searched for)

You'll see the problem here. The guy who's been entering the products has worked v hard but when you add a product to the basket it only comes out with the product name as you'd expect. Is there anyway I can get the system to change the product name to include the category when it's added to the basket or alternatively some script that could be run to go through the database to change the names to a format of 'category - subcategory - current product name?

I really need to know as I don't have the heart to tell him until I've explored every other avenue

Thanks,

Richard

24 Sep 2008, 6:22 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Product title made up from categories - please help!

You could use the EASYPOPULATE module to correct this.

Easypopulate lets you both DOWNLOAD product data already in your store, as well as UPLOAD product data to the store.

First, grab the easypopulate module (See Free Add Ons) and install it.

When this is all done, use easypopulate to EXPORT your product data. It will do this in a tab-delimited TXT file that you can then open in Excel.

With a bit of clever manipulation in Excel (using Excel's CONCATENATE function), you can join the two text strings.

Then, making sure to follow the strict protocols in EasyPopulate, send the data back to the webshop.

PS: Easypopulate requires that you use MODEL NUMBERS. I don't see this on your product data.

24 Sep 2008, 6:40 PM
#3
thehypo avatar

thehypo

Zen Follower

Join Date:
Jan 2006
Posts:
109
Plugin Contributions:
0

Re: Product title made up from categories - please help!

It sounds like that suggestion would involve actually renaming everything though. Not sure if this user wants to do that. If you do this, it will work great, but when you expand "carbon rod" you will see Carbon Rod .7mm Carbon Rod .9mm Carbon Rod 1.2mm (etc etc), which you may not want.

You can indeed get the category to appear with a bit of work. I've done it on my site so that when you click on "new products", among other places, it tells you the category for each product (which, like your site, is important for telling what the product actually is).

Zen has a nice function for it.
For each product, you will need to do something like this:

$products_category_name = zen_get_category_name(zen_get_products_category_id([THE PRODUCT ID]));

You just have to figure out what variable to use for the product ID that works. Then you can do something like:
echo $products_category_name .": ".[PRODUCT NAME VARIABLE];

It should already echo the [PRODUCT NAME VARIABLE] somewhere so you just have to add the category name.

If you need more specific help, let me know the specific template you are trying to affect.

25 Sep 2008, 2:42 PM
#4
rpain avatar

rpain

Zen Follower

Join Date:
Mar 2005
Location:
Watford, UK
Posts:
146
Plugin Contributions:
0

Re: Product title made up from categories - please help!

Hi,

Thanks for the ideas. I think the EasyPopulate road may be the best one to follow - what's the deal with the product model? Can he just give each item an invisible number to act as an id? The only other thing - where a category only has one item can I just leave it in the category view rather than go straight into the product info page? I do seem to remember a setting for this somewhere but I forgot a long time ago.

Thanks again,

Richard

25 Sep 2008, 3:09 PM
#5
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Product title made up from categories - please help!

TheHYPO:

It sounds like that suggestion would involve actually renaming everything though. Not sure if this user wants to do that. If you do this, it will work great, but when you expand "carbon rod" you will see Carbon Rod .7mm Carbon Rod .9mm Carbon Rod 1.2mm (etc etc), which you may not want.

When you bring the easypopulate file into MS Excel, you will have (amongst other columns):

v_products_name_1 . . . . . v_categories_name1 . . . . . v_categories_name_2

1 M LENGTH . . . . . . . . . . . . . Carbon Rod . . . . . . . . . . . . . . 1mm
1 M LENGTH . . . . . . . . . . . . . Carbon Rod . . . . . . . . . . . . . . 1.2mm
1 M LENGTH . . . . . . . . . . . . . Carbon Rod . . . . . . . . . . . . . . 1.5mm

If you use excel's CONCATENATE function to join the text elements of the cells in those three columns, you will ultimately get a conjoined string, which you can then apply to v_products_name_1

viz:

v_products_name_1

1M LENGTH Carbon Rod 1mm
1M LENGTH Carbon Rod 1.2mm
1M LENGTH Carbon Rod 1.5mm

As the CONCATENATE function in Excel is a formula, just copy the formula down a new column, covering all the entries in the spreadsheet.

Hey presto! in less than a minute you'll have all your products correctly named.

25 Sep 2008, 3:19 PM
#6
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Product title made up from categories - please help!

Here's a sample formula for Excel:

=CONCATENATE(C1," ",J1," ",K1)

Where:-
C1 = Column representing v_products_name_1
" " = letter space, to keep the words apart
J1 = Column representing v_categories_name_1
" " = letter space, to keep the words apart
K1 = Column representing v_categories_name_2

Naturally, your formula will have appropriate references - C, J, K are just for example.

When you have your column of concatenated text, highlight the entire column and COPY it, then put cursor in a clean column and use PASTE SPECIAL, (select Values radio button) and paste in a new column. Then you have plain text. It is this new column that you can use for your new product descriptions.

Be careful not to re-sort the spreadsheet data while doing this process!

25 Sep 2008, 3:27 PM
#7
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Product title made up from categories - please help!

If you struggle with this, send me a Private Message...

25 Sep 2008, 3:38 PM
#8
rpain avatar

rpain

Zen Follower

Join Date:
Mar 2005
Location:
Watford, UK
Posts:
146
Plugin Contributions:
0

Re: Product title made up from categories - please help!

Wow - thanks for the detailed advice - I didn't know about that excel function. Presumably then when I've finished updating the names, I just overwrite the v_products_name_1 column and reimport?

Thank you for your help - that's why I like this system so much due to the active developers. Do you have a website? Sometimes I get more work than I can manage so it would be good to have someone to pass some to (depending on whether you do freelance).

Richard

25 Sep 2008, 3:43 PM
#9
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Product title made up from categories - please help!

First thing is to install Easypopulate.

When you have it up and running, use it to do a full export of your product database.

If you like, e-mail me the resulting TXT file, and I'll get the names issue sorted out for you.

And yes, once you have the new TXT file (in EasyPopulate's format) you just FTP it to your temp folder, then use EP to install it.

My website: https://www.modshops.co.uk

25 Sep 2008, 4:48 PM
#10
thehypo avatar

thehypo

Zen Follower

Join Date:
Jan 2006
Posts:
109
Plugin Contributions:
0

Re: Product title made up from categories - please help!

I actually mistook when looking at your site; I thought the .7mm (for example) was the product, when it's just a subcategory with only 1 product in it (the length). So yes; You would probably be ok renaming the products; though when you clicked on .7mm you'd end up seeing the title as Carbon Rod: 0.7mm - 1m Length (or however you format it) under the 0.7mm breadcrumb link. I'd personally consider dumping the breadcrumb link on that page if you do this, since it seems superfluous.

25 Sep 2008, 10:52 PM
#11
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Product title made up from categories - please help!

Hello Hypo

just to advise... rpain sent me his EP dump. Good news is that we are able to sort it using the EP method and Excel Concatenation as discussed.