Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Add Field to product page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-03-2005, 05:33 AM
 
djdoubleh djdoubleh is offline
 

Newbie
  
Join Date: Feb 2005
Posts: 7
 

Default Add Field to product page

I need help! I am a newbie to x-cart and i am using x-cart pro 4.0.12. I need to add permanent fields to the product page without using the extra field or make the "extra fields" appear in separate columns on csv.

The reason why I prefer to add permanent fields is that I have a lot of products to import through my csv file and would love to have few more fields added to my csv import file and the "Extra Fields" in csv are muddled up into one column.

It is awkward for me to fill in the muddled "Extra fields" especially when I have up to 10 extra fields. If I can have the extra fields in separate columns and can be uploaded that way via csv, it will be nice but if that is not possible, I will rather prefer to have a few more product fields which can appear in my csv whenever I import or export my csv file.

Thanks for your anticipated help.

Henry
__________________
X-Cart PRO 4.0.18
Reply With Quote
  #2  
Old 04-03-2005, 06:20 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Post moved. Please read the forum descriptions and stickies carefully before posting, the Custom Mods forum is for COMPLETED MODS only. Thanks!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-04-2005, 03:50 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

you can add extra rows to the products table and then update these files

PRODUCT_DETAILS.TPL
PRODUCT_MODIFY.PHP

The import / export stuff will pick up the extra fields by itself
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 04-04-2005, 04:24 AM
 
djdoubleh djdoubleh is offline
 

Newbie
  
Join Date: Feb 2005
Posts: 7
 

Default

Quote:
Originally Posted by shan
you can add extra rows to the products table and then update these files

PRODUCT_DETAILS.TPL
PRODUCT_MODIFY.PHP

The import / export stuff will pick up the extra fields by itself

Hello Shan,

Can you kindly give me a detailed description of how to go about this. I am not so good in PHP and templates.

Your help will be highly appreciated. Thanks.

Henry
__________________
X-Cart PRO 4.0.18
Reply With Quote
  #5  
Old 04-04-2005, 04:33 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

dont have a lot of time at the mo but you basically add extra rows to the database then add code to input the new values in the tpl file and then update the update portion of the php file to match
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #6  
Old 04-05-2005, 10:48 AM
 
djdoubleh djdoubleh is offline
 

Newbie
  
Join Date: Feb 2005
Posts: 7
 

Default

I am getting errors, can someone help me out please. I added this to my xcart_products table in mysql : album_title varchar(255) NOT NULL ,

I added this to "Update Product data" in "include/product_modify.php" : album_title='$album_title', immediately after: db_query("UPDATE $sql_tbl[products] SET product='$product',

Then I added this: <TR>
{if $productids ne ''}<TD width="15" class="TableSubHead"><INPUT type="checkbox" value="Y" name="fields[album_title]"></TD>{/if}
<TD class="FormButton" nowrap>{$lng.lbl_album_title}:</TD>
<TD class="ProductDetails">
<INPUT type="text" name="album_title" size="45" class="InputWidth" value="{$product.album_title}">
</TD>
</TR>
to the "main/product_details.tpl".

Finally I went to the language section in admin and added "lbl_album_title" to the "labels".

Now each time i click on "Modify Product" or "Add Product" from admin or from the Provider end, I get errors.

Please remember that I am using X-Cart PRO.

Can anyone help me out. I need to know what else i need to do or what I must have done wrong. Thanks in anticipation.

Henry (djdoubleh)
__________________
X-Cart PRO 4.0.18
Reply With Quote
  #7  
Old 04-05-2005, 10:59 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

with pro it may be slightly different. im not sure
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #8  
Old 09-16-2005, 03:40 PM
 
Lucent88 Lucent88 is offline
 

Senior Member
  
Join Date: Aug 2005
Posts: 147
 

Default

I did the some modification in simliar steps.

I created extra fiels/row in xcart_products.

Edit product_detail.tpl to add the text fields.

edit product_modify.php to update informaton.

My question is, on product_modify.php ... is the

# update product data the only part I have to modify? It look fairly simple enough to do it.. but when I tried to update product detail from admin, it doesn't save/update. Am I missing some steps here?
__________________
X-Cart Gold 4.0.17
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:47 PM.

   

 
X-Cart forums © 2001-2020