jthornton Posted February 2, 2018 Share Posted February 2, 2018 (edited) Can cubecart handle multi part components in inventory? For example I have a cable that goes with several cards, is it possible to reduce inventory for the cables each time a different card is purchased? JT Edited February 4, 2018 by jthornton Quote Link to comment Share on other sites More sharing options...
Noodleman Posted February 2, 2018 Share Posted February 2, 2018 CubeCart can't do this out of the box, but the "Product Addons" module adds this functionality. https://www.cubecart.com/extensions/plugins/product-addons-easily-purchase-related-products Every product is a product in it's own right. you can associate products to essentially build part kits. I do plan on adding a "part kit" feature to make this easier in the future, IE, create a new product in CubeCart and configure which other products are included. When buying this one product it will add all the kit items to your cart. You can download/install and try the module out in Demo mode. Quote Link to comment Share on other sites More sharing options...
jthornton Posted February 2, 2018 Author Share Posted February 2, 2018 Noodleman, Thanks, if that works then it's worth the 50 bucks. I don't have a working store setup live at this time I'm just testing on localhost on a linux PC. JT Quote Link to comment Share on other sites More sharing options...
Noodleman Posted February 2, 2018 Share Posted February 2, 2018 Sure, if you need any help with it let meknow Quote Link to comment Share on other sites More sharing options...
jthornton Posted February 4, 2018 Author Share Posted February 4, 2018 I downloaded the extension (rather easy in v6) but I'm having basic problems testing the store on my localhost so I had to delete it for now until I sort out why I can't view products in the storefront. Does the test time start over when I download again? JT Quote Link to comment Share on other sites More sharing options...
jthornton Posted February 6, 2018 Author Share Posted February 6, 2018 (edited) I'm trying to install this and the instructions say to Quote FIND THE FOLLOWING CODE IN THE content.product.php file in the foundation skin I don't see a product.php file and when I grep for some of the code I get this: sudo grep -irl 'LANG.catalogue.add_to_basket' * [sudo] password for john: modules/plugins/product_addons/CubeCart 6 foundation skin sample code.txt modules/plugins/product_addons/skin/admin/index.tpl skins/foundation/templates/element.product.call_to_action.php skins/foundation/templates/content.category.php skins/foundation/templates/content.homepage.php skins/foundation/templates/content.certificates.php Also your video very briefly mentions something about a store skin inversion 51custom hook is required. I have no clue what that means. JT Edited February 6, 2018 by jthornton Quote Link to comment Share on other sites More sharing options...
Noodleman Posted February 6, 2018 Share Posted February 6, 2018 (edited) On 04/02/2018 at 12:16 PM, jthornton said: I downloaded the extension (rather easy in v6) but I'm having basic problems testing the store on my localhost so I had to delete it for now until I sort out why I can't view products in the storefront. Does the test time start over when I download again? JT If it's on a new domain / store, yes it does. 1 hour ago, jthornton said: I'm trying to install this and the instructions say to I don't see a product.php file and when I grep for some of the code I get this: sudo grep -irl 'LANG.catalogue.add_to_basket' * [sudo] password for john: modules/plugins/product_addons/CubeCart 6 foundation skin sample code.txt modules/plugins/product_addons/skin/admin/index.tpl skins/foundation/templates/element.product.call_to_action.php skins/foundation/templates/content.category.php skins/foundation/templates/content.homepage.php skins/foundation/templates/content.certificates.php Also your video very briefly mentions something about a store skin inversion 51custom hook is required. I have no clue what that means. JT in the newest versions of the Foundation theme, the content.product.php file was split into some other files. you are most likely wanting the element.product.call_to_action.php file. You don't need to worry about the custom hook unless you are using an earlier version of CubeCart, if you have just installed it then I assume you are using the latest. Edited February 6, 2018 by Noodleman Quote Link to comment Share on other sites More sharing options...
jthornton Posted February 7, 2018 Author Share Posted February 7, 2018 When I enable and save the module I get this error. Site error: the file /var/www/html/cubecart/modules/plugins/product_addons/hooks/controller.admin.php requires the ionCube PHP Loader ioncube_loader_lin_5.5.so to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted February 7, 2018 Share Posted February 7, 2018 From the error you are using PHP version 5.5, you also do not have the IonCube loaders installed on your web server. This is a requirement of the module. Do you manage your own web server, or obtain your hosting from a company? If your own server, see: http://www.ioncube.com/loader_installer.php If hosted via a company, they may have support articles which suggest how to enable it for you hosting package. I would also recommend you change to at least PHP 5.6, or if available to you 7.1 Quote Link to comment Share on other sites More sharing options...
jthornton Posted March 13, 2018 Author Share Posted March 13, 2018 (edited) I installed Debian 9 and got CubeCart 6.1.14 installed as well as The ionCube Loader version 10.2.0 for PHP 7.0 however I can not access my store or admin page anymore. All I get is a blank page for both. The following is the steps I used to install CubeCart. install Debian 9 ssh and web server sudo mkdir /var/www/html/cubecart sudo chown -R www-data:www-data /var/www/html/cubecart sudo usermod -a -G www-data $USER sudo chmod g+w /var/www/html/cubecart copy cubecart files to /var/www/html/cubecart sudo chown -R www-data:www-data /var/www/html/cubecart sudo apt-get update sudo apt-get install php7.0 sudo apt-get install php-xml sudo apt-get install php-mysql sudo apt-get install php7.0-gd sudo apt-get install php-curl sudo apt-get install php7.0-zip sudo apt-get install mariadb-server mariadb-client sudo apt-get install phpmyadmin yes yes To enable it the apache2 rewrite module sudo a2enmod rewrite sudo nano /etc/php/7.0/apache2/php.ini To enable MySQLi uncommented this line extension=php_mysqli.dll To enable cURL uncomment this line extension=php_curl.dll sudo nano /etc/apache2/apache2.conf add Include /etc/phpmyadmin/apache.conf <Directory /var/www/html/cubecart> AllowOverride All </Directory> sudo mysql -u root USE mysql; CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost'; FLUSH PRIVILEGES; SELECT User, Host, plugin FROM mysql.user; exit; sudo systemctl restart apache2 localhost/phpmyadmin user username create a database for cubecart Setup for running on localhost In /includes/global.inc.php, add the following: sudo nano /var/www/html/cubecart/includes/global.inc.php $glob['storeURL'] = 'http://localhost/cubecart'; // No trailing slash $glob['standard_url'] = 'http://localhost/cubecart'; // No trailing slash $glob['ssl_url'] = 'http://localhost/cubecart'; // No trailing slash $glob['cookie_domain'] = '127.0.1.1'; // No trailing slash $glob['rootRel'] = '/cubecart/'; // YES trailing slash or just a slash $glob['ssl_path'] = '/cubecart/'; // YES trailing slash or just a slash Install cubecart in a browser localhost/cubecart also to install ioncube I did sudo cp /var/www/html/ioncube/ioncube_loader_lin_7.0.so /usr/lib/php/20151012/ioncube_loader_lin_7.0.so sudo cp /home/john/00-ioncube.ini /etc/php/7.0/apache2/conf.d/00-ioncube.ini JT Edited March 13, 2018 by jthornton Quote Link to comment Share on other sites More sharing options...
Noodleman Posted March 13, 2018 Share Posted March 13, 2018 check the apache error log, what's in there? Quote Link to comment Share on other sites More sharing options...
jthornton Posted March 13, 2018 Author Share Posted March 13, 2018 PHP Fatal error: The file /var/www/html/cubecart/modules/plugins/product_addons/hooks/controller.admin.php was encoded by the ionCube Encoder for PHP 5.0 and cannot run under PHP 7.0.\n Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0, referer: http://localhost/cubecart/admin_ou6ju4.php?_g=plugins JT Quote Link to comment Share on other sites More sharing options...
Noodleman Posted March 13, 2018 Share Posted March 13, 2018 (edited) http://www.noodleman.co.uk/downloads/product_addons/1.0.12_product_addons_PHP7.1_and_above.zip if that doesn't work, I'll build another version. the 7.1 version was built with the later encoder library Edited March 13, 2018 by Noodleman Quote Link to comment Share on other sites More sharing options...
jthornton Posted March 13, 2018 Author Share Posted March 13, 2018 (edited) I got this error after installing CubeCart again. I'm running HP Version 7.0.27-0. I don't see PHP 7.1 as being available for Debian 9. PHP Fatal error: <br/>The file <b>/var/www/html/cubecart/modules/plugins/product_addons/hooks/class.cart.construct.pre.php</b> was encoded with the Encoder for PHP 7.1 and can only run on PHP 7.1 or later.<br/> If you are the administrator of this site then please upgrade to PHP 7.1 or later and install the corresponding ionCube Loader. in Unknown on line 0, referer: http://localhost/cubecart/setup/index.php Edited March 13, 2018 by jthornton Quote Link to comment Share on other sites More sharing options...
Noodleman Posted March 14, 2018 Share Posted March 14, 2018 Morning, Sorry about that, ionCube made some changes in the latest release which was made available a few days and I've not had time to update things yet. I've encoded a version of the module which should work for you with the latest ioncube versions. Download Here Quote Link to comment Share on other sites More sharing options...
jthornton Posted March 14, 2018 Author Share Posted March 14, 2018 (edited) You gotta love software developers that make incompatible changes... just curious why ioncube is needed for this module? I copied the product_addons directory to /var/www/html/cubecart/modules/plugins and inserted the code in /var/www/html/cubecart/skins/foundation/templates/element.product.call_to_action.php and I see the Accessories and Essentials button in the test product but when create a new product I don't see the Product Addons tab. I went to Manage Extensions and Product Addons is checked as enabled. What am I missing? You might want to change the install instructions to point to the new file as the place to insert the code. Also where can I change the text Accessories and Essentials to Options? JT Edited March 14, 2018 by jthornton Quote Link to comment Share on other sites More sharing options...
Noodleman Posted March 14, 2018 Share Posted March 14, 2018 I encode all of my commercial modules to protect my source code. It's common for commercial software to be protected. I'm working on a revised copy/paste example in the upcoming update to the module. Something that is friendlier for responsive themes, and revised instructions. Navigate to "Manage hooks" int he admin area, click on the addons module and save. then edit a product and check if the tab is there. The text is in the copy/paste example. Quote Link to comment Share on other sites More sharing options...
jthornton Posted March 14, 2018 Author Share Posted March 14, 2018 That makes sense I didn't think about code protection. Ok when creating a new product the product addons tab does not show up, it does show up when editing a product. The only place I can find accessories and essentials is the following line and sure enough when I change to options it changes. What tripped me up is it shows up in all caps and I was looking for ACCESSORIES AND ESSENTIALS <div class="collapsible" id="section1">Accessories and Essentials<span></span></div> JT Quote Link to comment Share on other sites More sharing options...
Noodleman Posted March 14, 2018 Share Posted March 14, 2018 showing up when editing only is by design. It shows in upper case due to a CSS rule in the same copy/paste example. look for "text-transform" in the same example code and remove it. Quote Link to comment Share on other sites More sharing options...
jthornton Posted March 14, 2018 Author Share Posted March 14, 2018 Thanks, now to work out some problems with the shipping modules. JT Quote Link to comment Share on other sites More sharing options...
jthornton Posted March 20, 2018 Author Share Posted March 20, 2018 When I add an addon product and press save I get a warning message that No product changes were made. JT I have base products A and B and addon's C D E. Is there a way to have if C or D is added to a base product then the price for E is $0? JT Quote Link to comment Share on other sites More sharing options...
jthornton Posted March 20, 2018 Author Share Posted March 20, 2018 For this store the ideal situation is to have PNG kit AC have part A + C + E without any options. Then I set the price of the Plug n Go kit to include E for free. The big deal for me is to keep my inventory correct. JT Quote Link to comment Share on other sites More sharing options...
Noodleman Posted March 21, 2018 Share Posted March 21, 2018 the warning about no changes made is a known thing. it's because the module stores it's data outside of the normal process which saved product data, thus CubeCart doesn't see the change and things there are no changes. the module isn't conditional at the moment, meaning you can't dynamically drop the price for one item based on the addition of other items to the cart. It's not a feature of the module but may be something I will consider in the future. I've another module on my roadmap which may provide this feature, but it's quite a way off being developed. There is a price override feature within the module, but it only checks if the addon product exits in the cart with it's parent product to apply the override price. it does not consider the other items which make up the kit. 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.