Thread: Category Price
View Single Post
  #1  
Old 11-02-2009, 01:43 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Category Price

Ok, so I added a new field to categories called cat_price in phpMy admin.

This is basically a category price (all prods within a cate will have the same price).

I added this to category_modify.tpl to get the field to show in the admin.
Code:
<tr> <td height="10" class="FormButton" nowrap="nowrap">Category Price:</td> <td width="10" height="10">&nbsp;</td> <td height="10"> <input type="text" name="order_by" size="5" value="{if $category_error ne ""}{$smarty.post.cat_price}{elseif $mode ne "add"}{$current_category.cat_price}{/if}" /> </td> </tr>

But now Im not sure how to get the value to save in the DB.

I tried category_modify.php
Code:
# # Update general data of category # db_query("UPDATE $sql_tbl[categories] SET category='$category_name', description='$description', meta_title='$meta_title', meta_descr='$meta_descr', meta_keywords='$meta_keywords', avail='$avail', order_by='$order_by' , cat_price='$cat_price' WHERE categoryid='$cat'"); func_membership_update("category", $cat, $membershipids);

but the value is not saving. What am I doing wrong?
__________________
xcart 5.1.2
Reply With Quote