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

How do I update the "Availability" field?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 12-19-2003, 12:12 PM
 
d2consul d2consul is offline
 

Newbie
  
Join Date: Aug 2003
Location: California
Posts: 9
 

Default How do I update the "Availability" field?

I'm trying to figure out how to update the Availability field from "disabled" to "Available for sale" & vice-versa.

Is there an easy way to upload a file that will modify just this field? What I would like to do is upload a .CSV file with the productcode & forsale entries have it update the changes

I have close to 500 products and not all of them are available all the time, sometimes I have to temporarily disable, and then make them available again once they are back in stock.

Any help would be greatly appreciated

Thanks!

X-Cart version 3.4.10
PHP 4.3.2
MySQL server 4.0.15-standard
Reply With Quote
  #2  
Old 12-19-2003, 02:37 PM
  shan's Avatar 
shan shan is offline
 

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

Default

could you not use the stock levels feature of xcart to do this automaticaly
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 12-19-2003, 05:54 PM
 
jordan0 jordan0 is offline
 

Advanced Member
  
Join Date: Oct 2003
Location: San Francisco, CA
Posts: 77
 

Default me too

I would like to be able to do this also, and not just with the availability field. Right now I can use the update inventory feature to change only the quantity and price columns of my products table. It would be great if the update inventory feature could update any / all of the columns such as categories, description, param values etc. Has anyone made this mod?

thanks
Jordan
__________________
Jordan Sitkin
http://www.kitkraft.biz
X-Cart 4.0.18 [unix]
Reply With Quote
  #4  
Old 12-20-2003, 11:31 AM
 
d2consul d2consul is offline
 

Newbie
  
Join Date: Aug 2003
Location: California
Posts: 9
 

Default

Quote:
Originally Posted by shan
could you not use the stock levels feature of xcart to do this automaticaly

I usually don't have any stock on hand, therefore I don't use stock levels. The way that I know what is available to me is a price list from the vendors I deal with. I would like to be able to update the price & availability based upon the information I receive every week.

I would like to keep it as simple as possible, but if the only way to do this is to update the inventory, then I guess I will have to use it that way, but let me know if any mod has been made (or can be made)

Thanks!
Reply With Quote
  #5  
Old 12-20-2003, 12:01 PM
 
d2consul d2consul is offline
 

Newbie
  
Join Date: Aug 2003
Location: California
Posts: 9
 

Default

OK, here is what I've just tried to do.

I checked the box in general settings that "disables products which are out of stock"

Then I updated the quantities of the products that are available now, but it did not change the previously "disabled" for sale items to be "available for sale" now.

Any tips on how to get this to work will be great.

Thanks again!
Reply With Quote
  #6  
Old 12-20-2003, 04:16 PM
 
jordan0 jordan0 is offline
 

Advanced Member
  
Join Date: Oct 2003
Location: San Francisco, CA
Posts: 77
 

Default that should work

your new approach should work if you switch the availability to "Y" on all products
__________________
Jordan Sitkin
http://www.kitkraft.biz
X-Cart 4.0.18 [unix]
Reply With Quote
  #7  
Old 12-20-2003, 11:44 PM
 
d2consul d2consul is offline
 

Newbie
  
Join Date: Aug 2003
Location: California
Posts: 9
 

Default Re: that should work

Quote:
Originally Posted by jordan0
your new approach should work if you switch the availability to "Y" on all products

I think you are correct, only if I had all products available from the initial upload of products. I am now trying to update so I don't lose the product ID's associated with each item. I would like to keep these intact to track order history for my customers.

The problem I'm running into is that some items available today might not be next week....but then the week after there will be new inventory that makes the original item available for sale once again. How would I go about updating the ones that were previously disabled that are now available?? Could I do this with the "Update Inventory" link? How many fields can I update using this feature?? As far as I can see, you can only update "PRODUCTCODE" & "PRICE" or "PRODUCTCODE" & "QUANTITIY"

If there is a way that I can update PRICE & AVAILABILITY at the same time. That is what I'm looking for.

Thanks in advance for any updated information posted here.
Reply With Quote
  #8  
Old 12-21-2003, 01:30 PM
 
jordan0 jordan0 is offline
 

Advanced Member
  
Join Date: Oct 2003
Location: San Francisco, CA
Posts: 77
 

Default yes there is a way

The built-in "update inventory" feature of x-cart only lets you change the price and quantity values for each product. In order to perform a "bulk" update of availability you will have to use a MySQL database editor such as phpMyAdmin.
I am on Mac OS X, so I use a program called CocoaMySQL. It lets me export the products table to a csv file just like xcart does, but I can update any/all data in the table this way and then re-import the products without creating duplicates. It took a few tries to get the export / import settings right so they would work with everything. I know there are tons of these programs around for Windows and Linux also. Be careful, though, and BACKUP FIRST!! ALWAYS!
__________________
Jordan Sitkin
http://www.kitkraft.biz
X-Cart 4.0.18 [unix]
Reply With Quote
  #9  
Old 01-21-2004, 12:51 PM
 
gfiebich gfiebich is offline
 

Senior Member
  
Join Date: Feb 2003
Location: St. Paul, MN
Posts: 108
 

Default

I realize this is an older thread, but I thought this post might be worthwhile to someone. I had a similar need as the original poster, but decided that adding the "Availiablity" field to the "Admin / Search Products" page would make disabling products very simple - vs. using the existing "Quantity" levels to disable products as others had suggested. To do this, you need to edit two files: "skin1 / main / products.tpl" and "include / process_product.php". I did this on a 3.3.5 install - so no guarantees on it working with any other version. The following code snippets begin with existing code for placement reference.

Step 1: edit "skin1 / main / products.tpl" - add the new column header
Code:
{section name=cat_num loop=$products} { if %cat_num.first% } <table border=0> <tr class=TableHead> <td>SKU</td> <td>Product</td> {if $usertype eq "A" or $active_modules.Simple_Mode ne ""} <TD>Pos.</TD> {/if} <TD>Quantity</TD> <td colspan=2>Shop price</td> <td nowrap>Your price</td> <td>Live?</td>

Step 2: edit "skin1 / main / products.tpl" - add the new "Availablity" field
Code:
<td nowrap align=right> <input type="text" size="7" value="{$products[cat_num].price}" name="product_price[{$products[cat_num].productid}]"> </td> <td> <input type="text" size="3" value="{$products[cat_num].forsale}" name="product_forsale[{$products[cat_num].productid}]"> </td>

Step 3: edit "include / process_product.php" - add the code that saves changes to "forsale"
Code:
if ($product_orderby) { foreach ($product_orderby as $key1 => $value) db_query ("UPDATE $sql_tbl[products] SET orderby='$value' WHERE productid='$key1'"); } if ($product_forsale) { foreach ($product_forsale as $key1 => $value) db_query ("UPDATE $sql_tbl[products] SET forsale='$value' WHERE productid='$key1'"); }

That's it! Now you can do a product search in Admin and update the availability of a batch of products in one pass - vs. opening each product detail, changing the availability, saving, etc.

-Glen
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 08:06 PM.

   

 
X-Cart forums © 2001-2020