altomarketing Posted April 5, 2014 Share Posted April 5, 2014 Hi, im newby and trying to configure my store 1.6 to sell virtual products, and would like to add extras features to the product, just like this image. Changing combinations change prices. But in my 1.6 says that virtual product can not have combinations, how to configure then ? Link to comment Share on other sites More sharing options...
NemoPS Posted April 5, 2014 Share Posted April 5, 2014 wow I made a tut on it as well: http://nemops.com/prestashop-1-5-virtual-products-combinations/ Link to comment Share on other sites More sharing options...
altomarketing Posted April 7, 2014 Author Share Posted April 7, 2014 wow I made a tut on it as well: http://nemops.com/prestashop-1-5-virtual-products-combinations/ does it work on 1.6 version ? its a fresh installed prestashop Link to comment Share on other sites More sharing options...
NemoPS Posted April 9, 2014 Share Posted April 9, 2014 I didn't try on that, you can have a go and let us know Link to comment Share on other sites More sharing options...
crimito Posted May 29, 2014 Share Posted May 29, 2014 Hi, does it work on 1.6 version then? Thank you Link to comment Share on other sites More sharing options...
iclavijos Posted July 25, 2014 Share Posted July 25, 2014 Hi there! I was able to make Nemo1's tutorial work with Prestashop 1.6 There's just one additional step compared to version 1.5. You need to override form.tpl (controllers/admin/templates/products/helpers/form) and there, comment out line 116. Basically, this is the original code: else if (product_type == product_type_virtual) { $('a[id*="Pack"]').hide(); $('a[id*="Shipping"]').hide(); $('a[id*="Combinations"]').hide(); }[ and this should be the final one: else if (product_type == product_type_virtual) { $('a[id*="Pack"]').hide(); $('a[id*="Shipping"]').hide(); //$('a[id*="Combinations"]').hide(); } Hope this helps 1 Link to comment Share on other sites More sharing options...
NemoPS Posted July 25, 2014 Share Posted July 25, 2014 Hey! Thanks for the addition, can I add it to the tut? I will credit you, of course! Link to comment Share on other sites More sharing options...
iclavijos Posted July 25, 2014 Share Posted July 25, 2014 Come on, mate! Most probably, I wouldn't have made it work without your previous work, so feel free to add it Cheers! Link to comment Share on other sites More sharing options...
NemoPS Posted July 30, 2014 Share Posted July 30, 2014 Added! thanks! http://nemops.com/prestashop-virtual-products-combinations/#.U9igb_na6r0 Link to comment Share on other sites More sharing options...
crimito Posted July 30, 2014 Share Posted July 30, 2014 Thank you both!! Link to comment Share on other sites More sharing options...
elektrojo Posted October 10, 2014 Share Posted October 10, 2014 Hi there! I was able to make Nemo1's tutorial work with Prestashop 1.6 There's just one additional step compared to version 1.5. You need to override form.tpl (controllers/admin/templates/products/helpers/form) and there, comment out line 116. Basically, this is the original code: else if (product_type == product_type_virtual) { $('a[id*="Pack"]').hide(); $('a[id*="Shipping"]').hide(); $('a[id*="Combinations"]').hide(); }[ and this should be the final one: else if (product_type == product_type_virtual) { $('a[id*="Pack"]').hide(); $('a[id*="Shipping"]').hide(); //$('a[id*="Combinations"]').hide(); } Hope this helps i followed every step till i reached to yours i dont have the folders ! controllers/admin/templates/products/helpers/form there are no folders after controllers/admin/ Link to comment Share on other sites More sharing options...
NemoPS Posted October 10, 2014 Share Posted October 10, 2014 if you mean in the override folder, you need to create that, otherwise it's in the admin folder, \themes\default\template\controllers Link to comment Share on other sites More sharing options...
jul_ste Posted October 30, 2014 Share Posted October 30, 2014 Hello, I'm trying to implement this override with PS 1.6.0.9 and am having an issue with the scricpt failing at line 67 else { $data->assign('product', $product); $this->displayWarning($this->l('You must save this product before adding combinations.')); } I'm not great at PHP - do I have something wrong with the override file? I've posted the content of the file below. Thanks! and any help is greatly appreciated. <?phpclass AdminProductsController extends AdminProductsControllerCore{public function initFormAttributes($product) { $data = $this->createTemplate($this->tpl_form); if (!Combination::isFeatureActive()) $this->displayWarning($this->l('This feature has been disabled. '). ' <a href="index.php?tab=AdminPerformance&token='.Tools::getAdminTokenLite('AdminPerformance').'#featuresDetachables">'.$this->l('Performances').'</a>'); else if (Validate::isLoadedObject($product)) { if ($this->product_exists_in_shop) //{ // if ($product->is_virtual) //{ //$data->assign('product', $product); //$this->displayWarning($this->l('A virtual product cannot have combinations.')); //} //else { $attribute_js = array(); $attributes = Attribute::getAttributes($this->context->language->id, true); foreach ($attributes as $k => $attribute) $attribute_js[$attribute['id_attribute_group']][$attribute['id_attribute']] = $attribute['name']; $currency = $this->context->currency; $data->assign('attributeJs', $attribute_js); $data->assign('attributes_groups', AttributeGroup::getAttributesGroups($this->context->language->id)); $data->assign('currency', $currency); $images = Image::getImages($this->context->language->id, $product->id); $data->assign('tax_exclude_option', Tax::excludeTaxeOption()); $data->assign('ps_weight_unit', Configuration::get('PS_WEIGHT_UNIT')); $data->assign('ps_use_ecotax', Configuration::get('PS_USE_ECOTAX')); $data->assign('field_value_unity', $this->getFieldValue($product, 'unity')); $data->assign('reasons', $reasons = StockMvtReason::getStockMvtReasons($this->context->language->id)); $data->assign('ps_stock_mvt_reason_default', $ps_stock_mvt_reason_default = Configuration::get('PS_STOCK_MVT_REASON_DEFAULT')); $data->assign('minimal_quantity', $this->getFieldValue($product, 'minimal_quantity') ? $this->getFieldValue($product, 'minimal_quantity') : 1); $data->assign('available_date', ($this->getFieldValue($product, 'available_date') != 0) ? stripslashes(htmlentities($this->getFieldValue($product, 'available_date'), $this->context->language->id)) : '0000-00-00'); $i = 0; $data->assign('imageType', ImageType::getByNameNType('small_default', 'products')); $data->assign('imageWidth', (isset($image_type['width']) ? (int)($image_type['width']) : 64) + 25); foreach ($images as $k => $image) { $images[$k]['obj'] = new Image($image['id_image']); ++$i; } $data->assign('images', $images); $data->assign($this->tpl_form_vars); $data->assign(array( 'list' => $this->renderListAttributes($product, $currency), 'product' => $product, 'id_category' => $product->getDefaultCategory(), 'token_generator' => Tools::getAdminTokenLite('AdminAttributeGenerator'), 'combination_exists' => (Shop::isFeatureActive() && (Shop::getContextShopGroup()->share_stock) && count(AttributeGroup::getAttributesGroups($this->context->language->id)) > 0 && $product->hasAttributes()) )); } } else $this->displayWarning($this->l('You must save the product in this shop before adding combinations.')); } else { $data->assign('product', $product); $this->displayWarning($this->l('You must save this product before adding combinations.')); } $this->tpl_form_vars['custom_form'] = $data->fetch(); } } Link to comment Share on other sites More sharing options...
lord_enzo Posted March 9, 2016 Share Posted March 9, 2016 This is not working in 1.6.1.0 Any idea why? Some of the files could not be located, so I guess that the core changes they included in this release made this fix unavailable... It would be great though to get this back!! Link to comment Share on other sites More sharing options...
NemoPS Posted March 11, 2016 Share Posted March 11, 2016 WHich files can't you locate? I am still using 1.5 so I guess any could have changed their location since then. The admin products controller is still there though Link to comment Share on other sites More sharing options...
Cloud Nine Posted March 11, 2016 Share Posted March 11, 2016 Hi, Prestashop should have added this feature in 1.5 but the team abandoned it. So sad ! I’ve bought a module for that and it’s working. There are some improvement needed in BO but it works very well in front end : http://addons.prestashop.com/fr/7475-virtual-products-with-combinations.html Link to comment Share on other sites More sharing options...
lord_enzo Posted April 4, 2016 Share Posted April 4, 2016 Cannot find this route at all: themes/default/template/controllers/products I know the default theme now is default-bootstrap, but I cannot find any template, or controllers anywhere... So I cannot use those files to replicate. I don't know if it's pretty obvious what I'm missing, but I cannot find anything! Link to comment Share on other sites More sharing options...
NemoPS Posted April 5, 2016 Share Posted April 5, 2016 It's in the admin folder, the theme is named default there Link to comment Share on other sites More sharing options...
lord_enzo Posted April 5, 2016 Share Posted April 5, 2016 thanks! Link to comment Share on other sites More sharing options...
Ascalion Posted May 23, 2016 Share Posted May 23, 2016 (edited) Hey there, just wanted to jump on this thread since it's related to Nemo's modifications (thanks for making a tutorial by the way!) I've followed every single step and am running the latest Prestashop version 1.6.1.5. It looks like something is still causing issues as I'm still getting the "You cannot use combinations with a virtual product" message and the combination tab disappears when I create a new virtual product. All this is very odd because every single modification is supposed to get rid of those exact things. I even went ahead and turned off the cache completely. I don't know what's missing; any pointers? I've attached the AdminProductsController.php here for you to take a look and see if there's anything that seems to conflict? Thanks in advance! AdminProductsController.php Edited May 24, 2016 by Ascalion (see edit history) Link to comment Share on other sites More sharing options...
Ascalion Posted May 23, 2016 Share Posted May 23, 2016 WHich files can't you locate? I am still using 1.5 so I guess any could have changed their location since then. The admin products controller is still there though Also just in case you'd like to update your tutorial for the newer version too with a note for 1.6, one thing changed location: 1. admin-products.js is now: js/admin/products.js Link to comment Share on other sites More sharing options...
nickzampieri Posted April 4, 2017 Share Posted April 4, 2017 Has anyone attempted this tutorial with 1.7.x? We have a need to sell virtual products with combinations but they are not downloadable products. We are selling memberships. There are several types of memberships that have varying times (1 week, 1 month, 3 months, 6 months, 1 year) as well as per use passes like (single use, 5 pack, 10, pack, 20 pack). And all of this is based on different types of memberships at the complex, like MMA, Karate, Boxing, Tactical Defence, Kick Boxing. We even have some MMA + Boxing combination memberships. The total number of combinations is well over 100. We want to leverage the whole "combinations" feature of regular products, but of course, there is nothing to ship or pickup in store when it comes to a membership. And then to create the combinations manually is not only time consuming, but from a UI and end user experience perspective, this is really painful. If anyone can give me tips on what I should do, please advise. If it means trying to retrofit the tutorial to 1.7, I will need some guidance as well. Thanks, Nick Link to comment Share on other sites More sharing options...
BlackEdition Posted November 20, 2018 Share Posted November 20, 2018 We are close to 2019 with Prestashop v1.7.4.4 and they still haven't added this simple feature in any updates! I wonder why? I don't see the need to spend a lot of money for something this simple that was actually available in older PS versions. Im also not a fan of changing some codes in core files because that would make it hard to test and make sure it works and to also doesn't face problems with other modules and PS future updates. Link to comment Share on other sites More sharing options...
Demacri Posted December 25, 2020 Share Posted December 25, 2020 Maybe too late, anyway I posted my free solution for Prestashop 1.7.x here: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now