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

updating weight through admin modify products list search re

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 08-07-2006, 11:56 AM
 
Audiolines Audiolines is offline
 

Senior Member
  
Join Date: Mar 2006
Posts: 102
 

Default updating weight through admin modify products list search re

in reference to this:

http://forum.x-cart.com/viewtopic.php?t=25483

I added the ability to change the product weights from the modify products search results page so you can go through and change the weight more quickly.

find your skin1/main/products.tpl
first right after
Code:
<TD nowrap>{if $search_prefilled.sort_field eq "price"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}{$lng.lbl_price} ({$config.General.currency_symbol})</TD>

add this
Code:
<td>Weight</td>

then find



Code:
<TD><INPUT type="text" size="9" maxlength="15" name="posted_data[{$products[prod].productid}][price]" value="{$products[prod].price}"{if $products[prod].is_variant eq 'Y'} readonly{/if}></TD>

add
Code:
<TD><INPUT type="text" size="9" maxlength="15" name="posted_data[{$products[prod].productid}][weight]" value="{$products[prod].weight}"></td>

then find in your include/process_product.php
Code:
# Perform SQL query to update products if (!empty($update)) db_query("UPDATE $sql_tbl[products] SET ".implode(",", $update)." WHERE productid='$k'");

right after that you put
Code:
# Modify weight if (isset($v["weight"])) { db_query("UPDATE $sql_tbl[products] SET weight='".intval($v["weight"])."' WHERE productid='$k'");}

let me know if this works for you. If you are better at xcart than me,Can you check over it to see if i did this correctly
__________________
version 4.0.17
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:09 AM.

   

 
X-Cart forums © 2001-2020