| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
free mod - How to Change Product Availability from Admin Search | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
free mod - How to Change Product Availability from Admin Search
Hi All,
I've been working with X-Cart for about a year now and have been slowly modifying things to make my daily job managing products easier. This tweak will allow you to change the product Availability directly from the Admin Product Search Results page without needing to go into the individual products. Here is what you need to change: Of course back up your files first before changing them. 1. open: include/process/product.php 2. around line 89 fine --># Perform SQL query to update products if (!empty($update)) db_query("UPDATE $sql_tbl[products] SET ".implode(",", $update)." WHERE productid='$k'") 3. Change it to --># Perform SQL query to update products if (!empty($update)) db_query("UPDATE $sql_tbl[products] SET ".implode(",", $update).", forsale='".$v["forsale"]."' WHERE productid='$k'") 4. Save the file 5. Open: skin1/main/products.tpl 6. Add a new column to the header row around line 38 or the line above {$lng.lbl_in_stock} I just hard coded it with --> <td nowrap="nowrap">Availability</td> 7. Now fine the block -->{if $main eq "category_products"} <td><input type="text" size="9" maxlength="10" name="posted_data[{$products[prod].productid}][orderby]" value="{$products[prod].orderby}" /></td> {/if} and after it add --> <td class="ProductDetails"> <select name="posted_data[{$products[prod].productid}][forsale]"> <option value="Y"{if $products[prod].forsale eq "Y"} selected="selected"{/if}>{$lng.lbl_avail_for_sale}</option> <option value="H"{if $products[prod].forsale eq "H"} selected="selected"{/if}>{$lng.lbl_hidden}</option> <option value="N"{if $products[prod].forsale ne "Y" && $product.forsale ne "H" && ($products[prod].forsale ne "B" || not $active_modules.Product_Configurator)} selected="selected"{/if}>{$lng.lbl_disabled}</option> {if $active_modules.Product_Configurator} <option value="B"{if $products[prod].forsale eq "B"} selected="selected"{/if}>{$lng.lbl_bundled}</option> {/if} </select> </td> 8. Save it and you are done. I know you can do a batch update by selecting the group of results and doing the batch modify from within the product modification page but this saves a little time; which for me adds up to hours a week.
__________________
VelocityArtAndDesign.com X-Cart v. 4.1.6 |
|||||||
#2
|
|||||||
|
|||||||
Re: free mod - How to Change Product Availability from Admin Search
Quote:
I followed your instruction and coding, but mine seems not work. In each line to be changed, you add a symbol of "-->". Should I put this code in my files as well? Meanwhile, x-cart v4.1.10 does not have include/process/product.php, but only has include/process_product.php.
__________________
Version 4.1.12 |
|||||||
#3
|
|||||||
|
|||||||
Re: free mod - How to Change Product Availability from Admin Search
gary - skip the -->
I was just using those as tags. to show the code in my post.
__________________
VelocityArtAndDesign.com X-Cart v. 4.1.6 |
|||||||
#4
|
|||||||
|
|||||||
Re: free mod - How to Change Product Availability from Admin Search
Any suggestions for implementing this in 4.1.9?
I ended up getting an error. Steve
__________________
xcart 4.1.9 Preorder/Back Order ezUpsell |
|||||||
#5
|
|||||||
|
|||||||
Re: free mod - How to Change Product Availability from Admin Search
Sorry but I do not know what changes x-cart may have made in later versions. Just remember that the arrows that I put in "-->" were just to mark my code in the post and should not be copied over.
__________________
VelocityArtAndDesign.com X-Cart v. 4.1.6 |
|||||||
#6
|
|||||||
|
|||||||
Re: free mod - How to Change Product Availability from Admin Search
CultTVman, the only difference for 4.1.9 is that the file in step 1.0 is
1. open: include/process_product.php Following the steps above as is after that then this works perfectly, and a very nice mod, thanks VelocityKurt, simple mod, but very effective, really pleased, it also gave me the opportunity to change the truncation of the Product Titles in the view.
__________________
Chris Barber Version 4.1.9 MOD - BCSE Shipping Estimator MOD - Shopzilla Feed MOD - Price Match with Captcha MOD - Links Manager 2008 MOD - One Page Checkout MOD - Sitemap |
|||||||
#7
|
|||||||
|
|||||||
Re: free mod - How to Change Product Availability from Admin Search
I will give it another shot and see what happens.
Thanks Steve
__________________
xcart 4.1.9 Preorder/Back Order ezUpsell |
|||||||
#8
|
|||||||
|
|||||||
Re: free mod - How to Change Product Availability from Admin Search
Anybody know how to use this mod so that the RRP or MSRP can appear and be edited from within the search results?
Chris
__________________
X-Cart v4.1.9 [unix] |
|||||||
#9
|
|||||||
|
|||||||
Re: free mod - How to Change Product Availability from Admin Search
Awesome mod! However, I did find something that should be added in the installation instructions:
Take care not to delete the semicolon at the end of step 3. If neglected, you will get this error: Quote:
__________________
X-Cart Gold 4.1.10 XCSEO Pro 1.1.7 IIS 7 / Windows 2008 PHP Version 5.2.6 MySQL Version 5.0.51a |
|||||||
#10
|
|||||||||
|
|||||||||
Re: free mod - How to Change Product Availability from Admin Search
Quote:
In line with Chris' post, anyone know how Weight can appear and be edited from within the search results?
__________________
Gary M. Twing Eagle Mountain Outfitters eaglemtnoutfitters.com Version 4.3.0 Gold 4.4.4 in operibus |
|||||||||
|
|||
X-Cart forums © 2001-2020
|