UncleSam Posted January 29, 2014 Share Posted January 29, 2014 Howdy, I am using CubeCart Version 5.2.1. Now, When adding a new item it does everything fine but when updating the product quantity of an existing item it does not reflect in the front end item still shows as out of stock. Please help. Thanks. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 29, 2014 Share Posted January 29, 2014 Bring this product up for editing in admin, and on the Options tab, is the Options Matrix table present? CubeCart 5.2.x introduced the concept of "Stock Levels for Product Options". As such, a product can have a stock level for the general product (flashlight - 19) as well as stock levels for each option variant (silver flashlight - 4, blue flashlight - 5, black flashlight -10). There have been several bug fixes related to the Options Matrix. There are more issues to be resolved, as well. Such as, what stock level gets reported? The flashlight (19)? Or the range of stock levels among all the optional variants (4-10)? Both? Quote Link to comment Share on other sites More sharing options...
UncleSam Posted January 29, 2014 Author Share Posted January 29, 2014 Thanks bsmither, Yes it is there but no options are selected. Please see the attached image. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 29, 2014 Share Posted January 29, 2014 What I see is that there are no options assigned to this product. So the storefront not changing the Out-of-Stock notice isn't related to stock levels of options. Knowing that you replaced the entire file catalogue.class.php from CC527 (as opposed to replacing just the range of statements as instructed), please let us know if the out-of-stock notice is a new problem, or a problem that has existed since you first installed CC521. In admin, Products, the Product Inventory list has a Stock column. Is the stock level reported here accurate? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 29, 2014 Share Posted January 29, 2014 I just experimented by using catalogue.class.php from CC527 in a CC521 installation, and nothing bad happened. Quote Link to comment Share on other sites More sharing options...
UncleSam Posted January 29, 2014 Author Share Posted January 29, 2014 It is not a new problem, The new class file has nothing to do with this as the issue was there before replacing the file. The stock levels are all above 1000 and same as under product edit page. Thanks. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 29, 2014 Share Posted January 29, 2014 "An updated stock level does not reflect in the front end item still shows as out of stock." By "front end", which pages are you referring to? The Latest Products on the Homepage, the list of products in a View Category page? The View Product page? Or everywhere? In admin, Store Settings, Stock tab, please enable "Show stock levels". Then visit that Product's page. There should be an indication of the stock level somewhere near the price. What is the name of the skin your store is using? Quote Link to comment Share on other sites More sharing options...
UncleSam Posted January 30, 2014 Author Share Posted January 30, 2014 By "front end", which pages are you referring to? The Latest Products on the Homepage, the list of products in a View Category page? The View Product page? Or everywhere? The page which ends in " /index.php?_a=category&cat_id=XX". I'm newbie to cubecart so it would be really helpful if you could help me find out which file is it. Weird thing is when I click on the out of stock button it takes me to the product details page and there it displays "in stock". In admin, Store Settings, Stock tab, please enable "Show stock levels". Then visit that Product's page. There should be an indication of the stock level somewhere near the price. I tried it and the stock status says in stock in the frontend (on the product details page, the one with Zoom Image.) What is the name of the skin your store is using? Vector. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 30, 2014 Share Posted January 30, 2014 Ok. So CubeCart knows that the product is not out of stock because you say you can buy it from the View Product page (_a=product). The following conversation talks about a problem with the BluePrint skin and how the View Category page (_a=category) will erroneously show "Out of Stock" indications. This is just FYI -- I'm not expecting you to do anything with this conversation. http://www.cubecartforums.org/index.php?showtopic=17303 I don't have a copy of the Vector skin (yet -- just now requested the free trial), so I can't determine if the code is at fault. Nor can I tell what the latest version is from their site. I will suggest that you contact the Vector skin people to see if there is an update. Let's try something (if you haven't already): in admin, Maintenance, Rebuild tab, check Clear Cache and click Submit. Does the item on the View Category page change status? Quote Link to comment Share on other sites More sharing options...
UncleSam Posted January 30, 2014 Author Share Posted January 30, 2014 Alrightyyy, I found the file with the issue. It is element.product.php This is the code : {if ($product.ctrl_stock || $product.ctrl_purchase) && !$CATALOGUE_MODE} <a href="#submit" class="btn btn-primary" title="{$LANG.catalogue.add_to_basket}"> <i class="icon-shopping-cart icon-white"></i> {$LANG.catalogue.add_to_basket} </a> {elseif !$CATALOGUE_MODE && $LANG.catalogue.out_of_stock_short} <a href="{$product.url}" class="btn btn-danger"> <i class="icon-shopping-cart icon-white"></i> {$LANG.catalogue.out_of_stock_short} </a> {/if} The "If" condition is not true (I have no idea why !!) so it goes inside the elseif (whicch shouldn't happen.) Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 30, 2014 Share Posted January 30, 2014 The condition is not true, indeed. In the other conversation I mentioned, $product.ctrl_stock is not defined, but $product.ctrl_purchase should be true. What you can try to do is one of two things: * Add {debug} to the bottom of this file * Add {var_dump($product)},{var_dump($CATALOGUE_MODE)} on a line just above the {if} line. The first will cause a Smarty pop-up to show all the variables available for this template (this 'debug console' should work with Vector), the second will show the values of these two variables at the top of the page. Quote Link to comment Share on other sites More sharing options...
UncleSam Posted January 30, 2014 Author Share Posted January 30, 2014 Here the output : array(53) { ["product_id"]=> string(4) "1289" ["status"]=> string(1) "1" ["product_code"]=> string(10) "852KGZO686" ["quantity"]=> string(1) "1" ["description"]=> string(0) "" ["price"]=> string(6) "£x.xx" ["sale_price"]=> string(6) "£x.xx" ["cost_price"]=> string(4) "0.25" ["name"]=> string(39) "Blac Normal" ["cat_id"]=> string(1) "5" ["popularity"]=> string(1) "8" ["stock_level"]=> string(3) "952" ["stock_warning"]=> string(3) "100" ["use_stock_level"]=> string(1) "1" ["digital"]=> string(1) "0" ["digital_path"]=> string(0) "" ["product_weight"]=> string(5) "0.000" ["tax_type"]=> string(1) "0" ["tax_inclusive"]=> string(1) "1" ["featured"]=> string(1) "1" ["seo_meta_title"]=> string(0) "" ["seo_meta_description"]=> string(0) "" ["seo_meta_keywords"]=> string(0) "" ["upc"]=> string(0) "" ["ean"]=> string(0) "" ["jan"]=> string(0) "" ["isbn"]=> string(0) "" ["date_added"]=> string(19) "2013-03-28 14:37:52" ["updated"]=> string(19) "2013-06-09 12:06:02" ["manufacturer"]=> string(2) "15" ["condition"]=> string(3) "new" ["brand"]=> string(0) "" ["gtin"]=> string(0) "" ["mpn"]=> string(0) "" ["ctrl_sale"]=> bool(false) ["description_short"]=> string(0) "" ["price_unformatted"]=> string(4) "4.99" ["sale_price_unformatted"]=> string(4) "0.00" ["ctrl_purchase"]=> bool(false) ["out"]=> bool(false) ["thumbnail"]=> string(49) "http://www.abc.com/images/cache/01.100.png" ["category"]=> string(49) "http://www.abc.com/images/cache/01.150.png" ["subcategory"]=> string(49) "http://www.abc.com/images/cache/01.100.png" ["gallery"]=> string(48) "http://www.abc.com/images/cache/01.50.png" ["normal"]=> string(49) "http://www.abc.com/images/cache/01.300.png" ["enlarge"]=> string(49) "http://www.abc.com/images/cache/01.600.png" ["small"]=> string(49) "http://www.abc.com/images/cache/01.150.png" ["medium"]=> string(49) "http://www.abc.com/images/cache/01.300.png" ["magnify"]=> bool(true) ["large"]=> string(49) "http://www.abc.com/images/cache/01.600.png" ["source"]=> string(46) "http://www.abc.com/images/source/01.png" ["review_score"]=> bool(false) ["url"]=> string(66) "http://www.abc.com/index.php?_a=product&product_id=1289" } ,string(0) "" and............ Smarty_Variable Object (3) ->value = 0 ->nocache = false ->scope = "file:skins/vector/templates/element.p..." $CART_TOTAL Smarty_Variable Object (3) ->value = 0 ->nocache = false ->scope = "file:skins/vector/templates/element.p..." $CATALOGUE_MODE Smarty_Variable Object (3) ->value = "" ->nocache = false ->scope = "file:skins/vector/templates/element.p..." $CHARACTER_SET Smarty_Variable Object (3) ->value = "UTF-8" ->nocache = false ->scope = "file:skins/vector/templates/element.p..." $CONFIG Smarty_Variable Object (3) ->value = Array (112) store_name => "abc efg" store_address => "Business Centre .." store_country => "826" store_zone => "471" store_postcode => "UB2 4AB" default_language => "en-GB" default_currency => "GBP" product_prices_include_tax => "0" basket_tax_by_delivery => "0" google_analytics => "" enable_reviews => "1" basket_order_expire => "" catalogue_sale_mode => "0" catalogue_sale_percentage => "" catalogue_sale_items => "" recaptcha => "0" admin_notify_status => "2" no_skip_processing_check => "" catalogue_hide_prices => "1" catalogue_mode => "" auto_save_cart => "1" allow_no_shipping => "" disable_shipping_groups => "" cookie_dialogue => "1" catalogue_products_per_page => "100" product_sort_column => "condition" product_sort_direction => "ASC" catalogue_show_empty => "1" product_precis => "" default_directory_symbol => "" catalogue_expand_tree => "1" basket_jump_to => "0" disable_checkout_terms => "" default_rss_feed => "" catalogue_latest_products => "1" catalogue_latest_products_count => "100" catalogue_popular_products_count => "100" catalogue_popular_products_source => "0" skin_folder => "vector" skin_style => "green" admin_skin => "default" skin_change => "0" skin_folder_mobile => "mobile" skin_style_mobile => "green" disable_mobile_skin => "0" download_expire => "" download_count => "" download_custom_path => "" stock_level => "1" basket_out_of_stock_purchase => "" stock_warn_type => "0" stock_warn_level => "10" product_weight_unit => "Lb" show_basket_weight => "" basket_allow_non_invoice_address => "" stock_change_time => "2" hide_out_of_stock => "1" store_title => "abc efg Limited" store_meta_description => "abc efg hij..." store_meta_keywords => "Mobile, mobile phone, ip..." seo_metadata => "0" seo => "0" seo_method => "0" seo_trackbacks => "0" ssl_force => "0" ssl_path => "" ssl_url => "" standard_url => "http://www.abc.com/shop" offline => "0" offline_allow_admin => "0" offline_content => "<br /><i>r</i><i>n</i>" license_key => "xxxxxxxxxxxxxxxxxxxxxxxxxxxx" email_method => "mail" email_name => "" email_address => "" email_smtp_host => "" email_smtp_port => "" email_smtp => "0" email_smtp_user => "" email_smtp_password => "" debug => "0" debug_ip_addresses => "" cache => "0" cache_memcache_list => "" proxy => "0" proxy_host => "" proxy_port => "" time_format => "%Y-%m-%d %H:%M" time_offset => "" time_zone => "UTC" feed_access_key => "" store_copyright => "<p> <strong>(c) 2013 www.abc.c..." product_clone => "1" product_clone_images => "" product_clone_options => "" product_clone_acats => "" product_clone_code => "1" product_clone_translations => "" product_clone_redirect => "" lkv => "xxxxxxxxxxxxxxxxxxxx" adminFile => "admin.php" adminFolder => "admin" dbdatabase => "abc" dbhost => "mysql213" dbprefix => "" dbusername => "abc" encoder => "ioncube" installed => "1" rootRel => "/" storeURL => "http://www.abc.com" bftime => "600" ssl => false ->nocache = false ->scope = "file:skins/vector/templates/element.p..." $COPYRIGHT Smarty_Variable Object (3) ->value = "<p> <strong>(c) 2013 www.abc.c..." ->nocache = false ->scope = "file:skins/vector/templates/element.p..." $CURRENT_PAGE Smarty_Variable Object (3) ->value = "http://www.abc.com/index.php?_..." ->nocache = false ->scope = "file:skins/vector/templates/element.p..." $GLOBALS Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 30, 2014 Share Posted January 30, 2014 ["ctrl_purchase"]=>bool(false) That's not right. Also, ["ctrl_stock"] is not defined. So now we need to learn why ctrl_purchase is false. Quote Link to comment Share on other sites More sharing options...
UncleSam Posted January 31, 2014 Author Share Posted January 31, 2014 Thanks, Now, what I did is, I changed the "Out of stock" text to "Log In" as suggested by a guy on the other thread and changed the styling to Blue button instead of red. So now when the user clicks on this "log In" button it takes him to the product details page where he see the correct "stock status" status and "Log in to view price" button. For now this is working just fine, but now sure if this could create problem in future. Importantly, So now we need to learn why ctrl_purchase is false. Is it because the "Hide prices until logged in" is enabled ? If that’s the case then the changes I’ve done won't affect the "if conditions" and I'm good to go. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2014 Share Posted January 31, 2014 "Is it because the "Hide prices until logged in" is enabled?" Was this ever mentioned before? Quote Link to comment Share on other sites More sharing options...
UncleSam Posted January 31, 2014 Author Share Posted January 31, 2014 Nope but it clicked my mind when I read this : http://www.cubecartf...showtopic=17303. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.