V1.7 Products as Combinations Module

n1ghtdem0n

Member
XNullUser
Joined
Nov 17, 2021
Messages
82
Reaction score
4
Points
8
NullCash
49
Guys, do you get error after u delete the one of the product which are in combination ?

I have to edit one of the product in combination to working again.

Any solutions?
Post automatically merged:

Guys, do you get error after u delete the one of the product which are in combination ?

I have to edit one of the product in combination to working again.

Any solutions?
Does anyone have an idea how to fix it?

error.png
Post automatically merged:

Guys, do you get error after u delete the one of the product which are in combination ?

I have to edit one of the product in combination to working again.

Any solutions?
Post automatically merged:


Does anyone have an idea how to fix it?

error.png
Invalid product vars
at line 174 in file classes/Link.php

Code:
169.             if (is_array($product) && isset($product['id_product'])) {
170.                 $params['id'] = $product['id_product'];
171.             } elseif ((int) $product) {
172.                 $params['id'] = $product;
173.             } else {
174.                 throw new PrestaShopException('Invalid product vars');
175.             }
176.         } else {
177.             $params['id'] = $product->id;
178.         }
179.

LinkCore->getProductLink - [line 34 - var/cache/dev/smarty/compile/classic/5b/ab/84/5bab8483e3fba71abaa974445826996e7a9d4624_2.file.combinations.tpl.php] - [7 Arguments]
Code:
29. $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['pc_combs']->value, 'comb');
30. $_smarty_tpl->tpl_vars['comb']->do_else = true;
31. if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['comb']->value) {
32. $_smarty_tpl->tpl_vars['comb']->do_else = false;
33. ?>
34.             <?php $_smarty_tpl->_assignInScope('productLink', $_smarty_tpl->tpl_vars['link']->value->getProductLink($_smarty_tpl->tpl_vars['comb']->value->id,$_smarty_tpl->tpl_vars['comb']->value->link_rewrite,null,null,null,null,$_smarty_tpl->tpl_vars['comb']->value->cache_default_attribute));?>
35.             <a class="variant-url imgsel<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['comb']->value->id, ENT_QUOTES, 'UTF-8');?>
36.  <?php if ($_smarty_tpl->tpl_vars['comb']->value->id == $_smarty_tpl->tpl_vars['product']->value['id']) {?>selected<?php }?>"
37.                  href="<?php if ($_smarty_tpl->tpl_vars['comb']->value->id == $_smarty_tpl->tpl_vars['product']->value['id']) {?>#<?php } else {
38. echo htmlspecialchars($_smarty_tpl->tpl_vars['productLink']->value, ENT_QUOTES, 'UTF-8');
39. }?>">

  • content_6222b3f27a2ee5_06229859 - [line 123 - vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php] - [1 Arguments]
Code:
118.             if ($_template->startRenderCallbacks) {
119.                 foreach ($_template->startRenderCallbacks as $callback) {
120.                     call_user_func($callback, $_template);
121.                 }
122.             }
123.             $unifunc($_template);
124.             foreach ($_template->endRenderCallbacks as $callback) {
125.                 call_user_func($callback, $_template);
126.             }
127.             $_template->isRenderingCache = false;
128.         } catch (Exception $e) {
Post automatically merged:

Any solutions ?
 
Last edited:

pepe123

Member
XNullUser
Joined
Feb 21, 2021
Messages
102
Reaction score
13
Points
18
NullCash
9
Here's the latest version of this module (v1.1.0).

Link for purchase: https://addons.prestashop.com/en/co...on/41032-normal-products-as-combinations.html


Overview
This module allows to use normal products as combinations.
Instead of using attributes, you can link multiple normal products between them and they will appear in the product page as if they are combinations.

What this module does for you
- Promote your products
- Useful if you have only a few products to sell, but with many variants. It won't make your shop look empty.
- You will also have full control on texts displayed for each combinations, since they are different products with their own texts and meta tags. This is especially useful for SEO and avoid duplicate content.
- It's also useful if you want to show available accessories for your products.

Installation
  • Download the zip file
  • Install from the Backoffice
  • Link your products from the module tab in your edit product page.
Post automatically merged:

I also made a nicer theme override as the default behaviour broke the image carousel... this one purely links to the products instead of updating the DOM with javascript (over-engineering for no reason in my opinion).

Just unzip and upload to the modules folder in your enabled theme folder.
Gracias por compartir. Voy a probarlo a ver si es lo que esperaba. Gracias.
 

n1ghtdem0n

Member
XNullUser
Joined
Nov 17, 2021
Messages
82
Reaction score
4
Points
8
NullCash
49
Guys, do you get error after u delete the one of the product which are in combination ?

I have to edit one of the product in combination to working again.

Any solutions?
Post automatically merged:


Does anyone have an idea how to fix it?

View attachment 45575
Post automatically merged:


Invalid product vars
at line 174 in file classes/Link.php

Code:
169.             if (is_array($product) && isset($product['id_product'])) {
170.                 $params['id'] = $product['id_product'];
171.             } elseif ((int) $product) {
172.                 $params['id'] = $product;
173.             } else {
174.                 throw new PrestaShopException('Invalid product vars');
175.             }
176.         } else {
177.             $params['id'] = $product->id;
178.         }
179.

LinkCore->getProductLink - [line 34 - var/cache/dev/smarty/compile/classic/5b/ab/84/5bab8483e3fba71abaa974445826996e7a9d4624_2.file.combinations.tpl.php] - [7 Arguments]
Code:
29. $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['pc_combs']->value, 'comb');
30. $_smarty_tpl->tpl_vars['comb']->do_else = true;
31. if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['comb']->value) {
32. $_smarty_tpl->tpl_vars['comb']->do_else = false;
33. ?>
34.             <?php $_smarty_tpl->_assignInScope('productLink', $_smarty_tpl->tpl_vars['link']->value->getProductLink($_smarty_tpl->tpl_vars['comb']->value->id,$_smarty_tpl->tpl_vars['comb']->value->link_rewrite,null,null,null,null,$_smarty_tpl->tpl_vars['comb']->value->cache_default_attribute));?>
35.             <a class="variant-url imgsel<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['comb']->value->id, ENT_QUOTES, 'UTF-8');?>
36.  <?php if ($_smarty_tpl->tpl_vars['comb']->value->id == $_smarty_tpl->tpl_vars['product']->value['id']) {?>selected<?php }?>"
37.                  href="<?php if ($_smarty_tpl->tpl_vars['comb']->value->id == $_smarty_tpl->tpl_vars['product']->value['id']) {?>#<?php } else {
38. echo htmlspecialchars($_smarty_tpl->tpl_vars['productLink']->value, ENT_QUOTES, 'UTF-8');
39. }?>">

  • content_6222b3f27a2ee5_06229859 - [line 123 - vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php] - [1 Arguments]
Code:
118.             if ($_template->startRenderCallbacks) {
119.                 foreach ($_template->startRenderCallbacks as $callback) {
120.                     call_user_func($callback, $_template);
121.                 }
122.             }
123.             $unifunc($_template);
124.             foreach ($_template->endRenderCallbacks as $callback) {
125.                 call_user_func($callback, $_template);
126.             }
127.             $_template->isRenderingCache = false;
128.         } catch (Exception $e) {
Post automatically merged:

Any solutions ?

Is there anyone to help me? I really need this module .. :(
 

dcdan

Member
XNullUser
Joined
Jan 25, 2022
Messages
184
Reaction score
1
Points
18
NullCash
3
Thank you very much for this module, it works great
 

alastis

Member
XNullUser
Joined
Mar 20, 2022
Messages
791
Reaction score
0
Points
16
NullCash
4
This is the module I was looking for. i hope it works.
 

hegBIT

Well-known member
Master
Diamond
Elite
XNullUser
Joined
Mar 30, 2021
Messages
772
Reaction score
704
Points
93
NullCash
18
Wow this is brilliant! jusy what i wanted for so long!
 

K__

New member
XNullUser
Joined
Feb 21, 2022
Messages
7
Reaction score
0
Points
1
NullCash
4
thx for share ! awsome liked. search a long time !
 

n1ghtdem0n

Member
XNullUser
Joined
Nov 17, 2021
Messages
82
Reaction score
4
Points
8
NullCash
49
BUMP BUMP BUMP! The problem is coming that the system doesn't delete the combination on database. Please for help how can i fix this?
 

pepe123

Member
XNullUser
Joined
Feb 21, 2021
Messages
102
Reaction score
13
Points
18
NullCash
9
Here's the latest version of this module (v1.1.0).

Link for purchase: https://addons.prestashop.com/en/co...on/41032-normal-products-as-combinations.html


Overview
This module allows to use normal products as combinations.
Instead of using attributes, you can link multiple normal products between them and they will appear in the product page as if they are combinations.

What this module does for you
- Promote your products
- Useful if you have only a few products to sell, but with many variants. It won't make your shop look empty.
- You will also have full control on texts displayed for each combinations, since they are different products with their own texts and meta tags. This is especially useful for SEO and avoid duplicate content.
- It's also useful if you want to show available accessories for your products.

Installation
  • Download the zip file
  • Install from the Backoffice
  • Link your products from the module tab in your edit product page.
Post automatically merged:

I also made a nicer theme override as the default behaviour broke the image carousel... this one purely links to the products instead of updating the DOM with javascript (over-engineering for no reason in my opinion).

Just unzip and upload to the modules folder in your enabled theme folder.
Gracias por compartir. Lo probare a ver que tal va.
 

beto82

Member
XNullUser
Joined
Feb 24, 2020
Messages
717
Reaction score
0
Points
16
NullCash
10
Gracias por compartir. Voy a probarlo a ver si es lo que esperaba. Gracias.
Post automatically merged:

Wow this is brilliant! jusy what i wanted for so long!
 

ToxiiK

Well-known member
Master
Diamond
Elite
Joined
Jul 19, 2019
Messages
853
Reaction score
540
Points
93
NullCash
19
Thank you very much for sharing this module...
 
Top