Adding/Modifying Fields in the Main Product Table
Does anybody know where to find info about modifying or adding fields in the main products table (as opposed to adding an extra field)?
How complicated is this? Which files (sql/php/tpl ??) are associated this type of mod? Example: - What are the implications of adding a new field "Artist" and displaying it on the main category or products listing page? Why not use extra fields? - The exported table is seperate to the main products table and makes editing in a spreadsheet cumbersome. As I am a newcomer forgive me if I have misunderstood anything basic and I look forward to your replies. |
Re: Adding/Modifying Fields in the Main Product Table
If you take a look at some of my freebie mods, you'll pick up a few tips on how to add custom fields to the products table and manage them in admin. It's not too hard, failing that I'll post a quick tutorial.
Cheers, Phil |
Re: Adding/Modifying Fields in the Main Product Table
OK, here's how it's done in v4.1.x ...
1) Add a new product text field called 'artist'... Patch the database... Code:
ALTER TABLE `xcart_products` ADD `artist` TEXT NOT NULL ; Look for... Code:
# Update product data Code:
$query_data = array( ... ); Code:
"artist" => $artist, Add this code in a suitable place... Code:
<tr> Code:
<tr> To use the field on your product page, (skin1/customer/main/product.tpl), use this code... Code:
{$product.artist} Code:
{$products[product].artist} Code:
{$product.artist} |
Re: Adding/Modifying Fields in the Main Product Table
Excellent, that looks straightforward - appreciate your help.
|
Re: Adding/Modifying Fields in the Main Product Table
Just tried the above code - worked first time, suddenly everything seems so much easier - cheers Phil
|
Re: Adding/Modifying Fields in the Main Product Table
What I don't understand is why I would have to add the extra field to the database even AFTER I've added it to the product through the Admin area. Where is this data stored in the first place? I have v4.0.19, will this still work?
|
Re: Adding/Modifying Fields in the Main Product Table
Is it possible to use this new fiels in the Product Varients table?
Thanks. |
Re: Adding/Modifying Fields in the Main Product Table
Be warned while this works trying to "modify products" after this is frustrating becasue there are some steps missing you will get sql errors
|
Re: Adding/Modifying Fields in the Main Product Table
It's meant for v4.1.x stores, not v4.0.x
|
Re: Adding/Modifying Fields in the Main Product Table
how can I use it in the simple search?
Thank you Gitty |
All times are GMT -8. The time now is 07:17 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.