joe122joe Posted June 21, 2018 Share Posted June 21, 2018 @raiwa is it possible in admin/stats_low_stock_attrib.php that can sort be by "products_options_values_name" ? Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted June 22, 2018 Author Share Posted June 22, 2018 No it is not possible if you mean sort the products by products_options_values_name . It would need a mayor rewrite. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 31, 2018 Share Posted July 31, 2018 @raiwa Great job on this one. I'm getting a duplicate error for the function tep_values_name when installing one of the modules. It is declared in the admin's general.php and in the table module. I renamed the function to tep_values_name_shop in the table module since, I think, that is the only place it is used. Just letting you know. The shop I'm installing this into has about 2,000 sick products. I seem to recall a script in one of the older versions that fixed all of those in one go. Did you code such an option into this one? raiwa 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥altoid Posted August 1, 2018 Share Posted August 1, 2018 (edited) Hello, After adding new files...I was getting this error on the admin side. This page isn’t working www.mysite.com is currently unable to handle this request. HTTP ERROR 500 by removing includes/modules/content/product_info/cm_pi_qtpro_table.php I am again able to access the admin side. Also, instructions show includes/languages/english/modules/content/product_info_options/ The provided new files are in: includes\languages\english\modules\content\product_info This is for the CE version. Thank you Edited August 1, 2018 by altoid raiwa 1 Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥raiwa Posted August 1, 2018 Author Share Posted August 1, 2018 Hello Jack @Jack_mcs, Thanks for the reports. 11 hours ago, Jack_mcs said: I'm getting a duplicate error for the function tep_values_name when installing one of the modules. It is declared in the admin's general.php and in the table module. I renamed the function to tep_values_name_shop in the table module since, I think, that is the only place it is used. Just letting you know. I would recommend to wrap "function_exists" around the "tep_values_name" function in the table module: /*Copied from admin functions*/ if(!function_exists('tep_values_name')) { function tep_values_name($values_id) { global $languages_id; $values = tep_db_query("select products_options_values_name from products_options_values where products_options_values_id = '" . (int)$values_id . "' and language_id = '" . (int)$languages_id . "'"); $values_values = tep_db_fetch_array($values); return $values_values['products_options_values_name']; } } I'll fix this in the next update. 12 hours ago, Jack_mcs said: The shop I'm installing this into has about 2,000 sick products. I seem to recall a script in one of the older versions that fixed all of those in one go. Did you code such an option into this one? I guess it is the following: when you install the qtpro add-on and activate "track stock" for some options in Products Attributes, it throws this error for all products which are using these options. You need to enter stock quantities for all products for at least one option/attribute combination. I do not remember any script in the old version which I used as a starting point for my package. I also can't imagine how to do this, other than to automatic enter a ficticious stock quantitity which doesn't make sense for me. If we want to control options/attributes stock, the quantity should match the real stock, or do I miss something? Thanks again and best regards Rainer Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted August 1, 2018 Author Share Posted August 1, 2018 5 hours ago, altoid said: After adding new files...I was getting this error on the admin side. This page isn’t working www.mysite.com is currently unable to handle this request. HTTP ERROR 500 by removing includes/modules/content/product_info/cm_pi_qtpro_table.php I am again able to access the admin side. I believe it's the same reason Jack posted above, the "tep_values_name" function is duplicated. please apply the fix I posted in the above message to the table module: includes/modules/content/product_info/cm_pi_qtpro_table.php 5 hours ago, altoid said: The provided new files are in: includes/languages/english/modules/content/product_info_options/ Thanks for the report, I'll fix it also in the next update. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted August 1, 2018 Author Share Posted August 1, 2018 Version 5.6.1. with the above fixes uploaded . Update only required for CE Frozen. https://apps.oscommerce.com/e317m&qtpro-bs altoid 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥altoid Posted August 1, 2018 Share Posted August 1, 2018 6 hours ago, raiwa said: I believe it's the same reason Jack posted above, the "tep_values_name" function is duplicated. please apply the fix I posted in the above message to the table module: includes/modules/content/product_info/cm_pi_qtpro_table.php Thanks for the report, I'll fix it also in the next update. Also noticed in the instructions for CE Frozen: admin/includes/qtprodoctor.php admin/includes/stats_low_stock_attrib.php admin/includes/stock.php However in the new files provided they are located in admin/ And in instructions: includes/hooks/shop/qtpro/qtpro_hooks.php However in the new files provided the path is catalog\includes\hooks\shop\checkout_process Thx...Steve K raiwa 1 Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥raiwa Posted August 2, 2018 Author Share Posted August 2, 2018 Thanks Steve @altoid, just uploaded the new package with the fixes dr_lucas 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥altoid Posted August 2, 2018 Share Posted August 2, 2018 Hello, I'm using modular shopping cart. Do we need a language file for includes/modules/content/shopping_cart/cm_sc_product_listing_qtpro.php Thx...Steve K Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥altoid Posted August 2, 2018 Share Posted August 2, 2018 26 minutes ago, altoid said: Hello, I'm using modular shopping cart. Do we need a language file for includes/modules/content/shopping_cart/cm_sc_product_listing_qtpro.php Thx...Steve K Meaning in the instructions area. raiwa 1 Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥altoid Posted August 2, 2018 Share Posted August 2, 2018 Suggestion...in the instructions: 2.7a. shopping_cart.php NOTE: If you are using modular shopping cart, just uninstall the original "cm_sc_product_listing.php" module and install "cm_sc_product_listing_qtpro.php" module instead. In that case you do not need to apply the following modifications I suggest adding something like If have enabled the modular shopping cart "options and attribute" module, you should uninstall that after adding QT Pro. Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥raiwa Posted August 2, 2018 Author Share Posted August 2, 2018 5 hours ago, altoid said: If have enabled the modular shopping cart "options and attribute" module, you should uninstall that after adding QT Pro. @altoid, where is this module from, it is not part of the modular shopping cart add-on.. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥altoid Posted August 2, 2018 Share Posted August 2, 2018 2 hours ago, raiwa said: @altoid, where is this module from, it is not part of the modular shopping cart add-on.. Looking closer, it's actually a core module. Content>product_info After the QT pro install, I had two product and attribute drop downs showing. So I figured out I need to disable the core one. Sorry that was off, but it probably should be mentioned in the instructions to disable the core module as it's not needed with QT pro. Does that make sense? raiwa 1 Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥altoid Posted August 3, 2018 Share Posted August 3, 2018 Might have found another issue. In modules>content>QTPro Options With this setting: Use Actual Price Pull DownsTrue The drop down is not adding the increased cost of an attribute, but rather all attributes are showing the same base price. For example if small size is $10 and medium is supposed to be $12 and large $14, they all show 10 If I set the above to false, the attributes indicate correctly what the additional cost is for attributes. I am using the single drop down Product Info Attribute Display Pluginsingle_dropdown raiwa 1 Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥raiwa Posted August 3, 2018 Author Share Posted August 3, 2018 Hello Steve @altoid, Yes this error has been already introduced in version 5.4. Please find in includes/classes/pad_base.php line 406-408: $newprice = ((int)$price - (int)$attrib['data-price']); } else { $newprice = ((int)$price + (int)$attrib['data-price']); and change to: $newprice = ((int)$price - (int)$attrib['price']); } else { $newprice = ((int)$price + (int)$attrib['price']); Please confirm and I'll upload a new version with all fixes Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥altoid Posted August 3, 2018 Share Posted August 3, 2018 2 hours ago, raiwa said: Hello Steve @altoid, Yes this error has been already introduced in version 5.4. Please find in includes/classes/pad_base.php line 406-408: $newprice = ((int)$price - (int)$attrib['data-price']); } else { $newprice = ((int)$price + (int)$attrib['data-price']); and change to: $newprice = ((int)$price - (int)$attrib['price']); } else { $newprice = ((int)$price + (int)$attrib['price']); Please confirm and I'll upload a new version with all fixes This fix worked. I'm using PP express and with a couple test sessions all seems good with QTPro. Thanks much. Steve K raiwa 1 Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥raiwa Posted August 4, 2018 Author Share Posted August 4, 2018 (edited) @Jack_mcs and other coders. I found that the _build_attributes_combinations function works correct up to PHP 7.1, buit in PHP 7.2 produces duplicated entries in the attributes array (single drop down and radio). Example: PHP 7.2: PHP 7.1: I couldn't find the problem/fix. Could you have a look if you see something which should be updated for PHP7.2: function _build_attributes_combinations($attributes, $showoos, $markoos, &$combinations, &$selected_combination, $oidindex=0, $comb=array(), $id="", $text='', $isselected=true, $price='', $image=array()) { global $cart, $currencies; foreach ($attributes[$oidindex]['ovals'] as $attrib) { $newcomb = $comb; $newcomb[$attributes[$oidindex]['oid']] = $attrib['id']; $newid = $id.','.$attributes[$oidindex]['oid'].'-'.$attrib['id']; $newtext = $text.", ".$attrib['text']; $newprice = $price; // product optionsimages support $newimage = $image; if ($this->options_images) { $newimage[] .= $attrib['image']; } if(MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_ATTRIBUTE_ACTUAL_PRICE_PULL_DOWN == 'True') { if ($attrib['prefix'] == '-') {// in case price lowers, don't add values, subtract. $newprice = ((int)$price - (int)$attrib['price']); } else { $newprice = ((int)$price + (int)$attrib['price']); } } if (isset($cart->contents[$this->products_id]['attributes'][$attributes[$oidindex]['oid']])) { $newisselected = ($cart->contents[$this->products_id]['attributes'][$attributes[$oidindex]['oid']] == $attrib['id']) ? $isselected : false; } else { $newisselected = false; } if (isset($attributes[$oidindex+1])) { $this->_build_attributes_combinations($attributes, $showoos, $markoos, $combinations, $selected_combination, $oidindex+1, $newcomb, $newid, $newtext, $newisselected, $newprice, $newimage); } else { $is_out_of_stock = $this->check_stock_qtpro(tep_get_prid($this->products_id),1,$newcomb); if ( !$is_out_of_stock || ($showoos == true) ) { if(MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_ATTRIBUTE_ACTUAL_PRICE_PULL_DOWN == 'True') { $combprice = ' ' . $currencies->display_price( $newprice + $this->products_original_price, tep_get_tax_rate($this->products_tax_class_id)); } else { $combprice = null; } switch ($markoos) { case 'Left': $newtext=($is_out_of_stock ? MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_OUT_OF_STOCK . ' - ' : '') . substr($newtext,2) . $combprice; break; case 'Right': $newtext=substr($newtext,2) . $combprice . ($is_out_of_stock ? ' - ' . MODULE_CONTENT_PRODUCT_INFO_QTPRO_OPTIONS_OUT_OF_STOCK : ''); break; default: $newtext=substr($newtext,2) . $combprice; break; } // product optionsimages support if ($this->options_images) { $combinations[] = array('comb'=>$newcomb, 'id'=>substr($newid,1), 'text'=>$newtext, 'image'=>$newimage); } else { $combinations[] = array('comb'=>$newcomb, 'id'=>substr($newid,1), 'text'=>$newtext); } if ($newisselected) $selected_combination = sizeof($combinations)-1; } } } } Thanks in advance Rainer Edited August 4, 2018 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted August 4, 2018 Share Posted August 4, 2018 just tested in http://sandbox.onlinephpfunctions.com/ against 7.2.4 and did not show any compatibility issues! raiwa and altoid 1 1 Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted August 4, 2018 Share Posted August 4, 2018 @raiwa I installed this quickly into a fresh, new Frozen shop on my local server (XAMPP) running PHP 7.2.1 and I don't get any duplicate entries. Everything looks good here. raiwa and altoid 1 1 Quote Link to comment Share on other sites More sharing options...
♥altoid Posted August 4, 2018 Share Posted August 4, 2018 @raiwa Live shop. PHP 7.2.7 raiwa 1 Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥raiwa Posted August 4, 2018 Author Share Posted August 4, 2018 @JcMagpie, @Tsimi, @altoid, Thanks for the time to test. You are right, all good on a fresh new installation. My PHP 7.2 develop-test store's configuration entries were corrupted. New version 5.6.2. with the last fixes uploaded Best regards Rainer altoid and Tsimi 2 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥altoid Posted August 5, 2018 Share Posted August 5, 2018 With error reporting set to all I see this error Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/barkav5/public_html/includes/modules/content/shopping_cart/cm_sc_product_listing_qtpro.php on line 62 Running php 7.2.7 raiwa 1 Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
♥raiwa Posted August 6, 2018 Author Share Posted August 6, 2018 (edited) @altoid, thanks for the report. Please modify in cm_sc_product_listing_qtpro.php: find line 62: while (list($option, $value) = each($products[$i]['attributes'])) { replace by: foreach($products[$i]['attributes'] as $option => $value) { find line 108-109: reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { replace by: foreach($products[$i]['attributes'] as $option => $value) { Please confirm. I'll do some more checks and upload then the new version with the fixes. Meanwhile I found the reason for the duplicated entries in the single drop down: I had the option images support added, but no images uploaded, the duplicated entries were the alt text for the images. I modified the code so image calls are only included if images exist to avoid this error. It will also be included in the next update. Edited August 6, 2018 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥altoid Posted August 6, 2018 Share Posted August 6, 2018 5 hours ago, raiwa said: @altoid, thanks for the report. Please modify in cm_sc_product_listing_qtpro.php: find line 62: while (list($option, $value) = each($products[$i]['attributes'])) { replace by: foreach($products[$i]['attributes'] as $option => $value) { find line 108-109: reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { replace by: foreach($products[$i]['attributes'] as $option => $value) { Please confirm. I'll do some more checks and upload then the new version with the fixes. Meanwhile I found the reason for the duplicated entries in the single drop down: I had the option images support added, but no images uploaded, the duplicated entries were the alt text for the images. I modified the code so image calls are only included if images exist to avoid this error. It will also be included in the next update. After making the change for line 62 I get this error: Parse error: syntax error, unexpected '$products_name' (T_VARIABLE) in /home/Username/public_html/includes/modules/content/shopping_cart/cm_sc_product_listing_qtpro.php on line 63 Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. 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.