Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

global options disappear adding back changes stock to zero Rate Topic   - - - - -

 
  • pako
  • Junior Member
  • Members
  • Join Date: 04-Oct 06
  • 21 posts

Posted 23 November 2006 - 03:53 AM #1

So not only do my global options magically disappear but now when I go back to click them "available" in the product admin pages, the stock level changes to a "0" even though its not zero. This appears on the storefront side (stock level is correct on admin side). It does not say out of stock, and still allows customer to add to cart. Any suggestions? Oh, I noticed these problems when I tried to use the product configurator along with a global option. Could this be causing the problem?

 
  • mpjbay
  • Senior Member
  • Members
  • Join Date: 30-Oct 06
  • 234 posts

Posted 23 November 2006 - 05:06 PM #2

i had the same problem, tech support emailed me with this fix.

Please modify the "fn_catalog.php" file located in the "core/" directory of your CS-Cart location and replace there the following part of code:


$link_opts = db_get_hash_array("SELECT a.product_id, a.option_id, a.option_type, a.position, a.inventory, b.option_name, b.option_text FROM $db_tables[product_options] as a LEFT JOIN $db_tables[product_options_descriptions] as b ON a.option_id=b.option_id AND b.lang_code='$lang_code' LEFT JOIN $db_tables[product_global_option_links] as c ON c.option_id=a.option_id WHERE c.product_id='$product_id' $avail $os_cond ORDER BY a.position", 'option_id');


with this one:


$link_opts = db_get_hash_array("SELECT a.product_id, a.option_id, a.option_type, a.position, a.inventory, a.avail, b.option_name, b.option_text FROM $db_tables[product_options] as a LEFT JOIN $db_tables[product_options_descriptions] as b ON a.option_id=b.option_id AND b.lang_code='$lang_code' LEFT JOIN $db_tables[product_global_option_links] as c ON c.option_id=a.option_id WHERE c.product_id='$product_id' $avail $os_cond ORDER BY a.position", 'option_id');


Save the file.
After the changes, it will be possible to make your global options available or not available by checking corresponding checkboxes.
Matt Johnson

http://ecoitsf.com/

 
  • krur
  • Senior Member
  • Members
  • Join Date: 07-Jun 06
  • 114 posts

Posted 23 November 2006 - 05:59 PM #3

i think this problem (and solution) could be relatedwith the bug i found here:
http://vb.cs-cart.co...iew&vbug_id=166

Zeke said it was notabug (?), but someoneprovided a patch (different from thins one)..

i'll go deep into thisin next days....
stefano cecere
krur.com - multimedia company
CS-Cart v2.0.12 - italian mods (full translations and data + Banca Sella + Invoices / Fatture)