News:

Support the VirtueMart project and become a member

Main Menu

Product kits - a developer for new VM feature

Started by maxispin, March 21, 2016, 22:27:25 PM

Previous topic - Next topic

Studio 42

Quote from: K&K media production on November 07, 2016, 16:20:09 PM
Quote from: Studio 42 on November 06, 2016, 21:13:49 PM
I don't want loose time each new VM release, so  i only publish it when Vm dev stop to change behavior on each release.

Which changed behavior on each release? I've no adjustments for all of my extensions for vm 3.0.18.
old selected Price array is not used anymore, so now you need to check if product->prices exist or not.
But in new way the prices names change too. So you cannot use one or other but have to update the right price names too.
I have other plugin in customers site using same method as me when you need to change main product price, but in the cart calculation, i mean that this method changed too.
So you have to modify the function plgVmPrepareCartProduct too, to set right prices.

bortolani

Quote from: Milbo on November 07, 2016, 16:14:36 PM
I want to write a new feature, which would combine reviews of the children and show them for the parent.

Hi Milbo,
I wrote it already. You can see it here if you are interested: www.puffosport.it/puffo2
I also created a module to show reviews with several options.

Feel free to write a review for a product if you like.

Bruno

K&K media production

Quote from: Studio 42 on November 07, 2016, 19:10:23 PM
old selected Price array is not used anymore, so now you need to check if product->prices exist or not.
But in new way the prices names change too. So you cannot use one or other but have to update the right price names too.

I've looked trough the calculationh.php log and can't find new names for the prices or other big changes.

Studio 42

Quote from: K&K media production on November 08, 2016, 13:50:23 PM
I've looked trough the calculationh.php log and can't find new names for the prices or other big changes.

CHeck in a vmcustom product plugin, before in vm 3.0.16 product->prices was not existing and you had to use selected price to update right price for eg. and i don't speak about vm 2.x
dump your $product in a plugin plgVmOnDisplayProductFEVM3 and plgVmPrepareCartProduct

Milbo

Patrick you misunderstood a lot.

We had always $product->prices and we could only hold ONE price. Now we have $product->allPrices, which is an array, which keeps all prices of the product. To know which price is active, we have now the $product->selectedPrice. But to keep it backward compatible, the $product->prices is set to $product->allPrices[$product->selectedPrice]

$child->prices = $child->allPrices[$child->selectedPrice];

But this price is set in getProduct, not in getProductSingle.

The trigger plgVmPrepareCartProduct is very important. In VM2, the cart takes just the form, thats it. For example a product had 3 length variants, you could buy a non existing variant, by manipulating the form. The trigger plgVmPrepareCartProduct checks the values of the form. So plugins can now verify the information/selection given by the user.

And all this was changed from vm2 to vm3.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Quote from: bortolani on November 07, 2016, 22:49:33 PM
Quote from: Milbo on November 07, 2016, 16:14:36 PM
I want to write a new feature, which would combine reviews of the children and show them for the parent.

Hi Milbo,
I wrote it already. You can see it here if you are interested: www.puffosport.it/puffo2
I also created a module to show reviews with several options.

Feel free to write a review for a product if you like.

Bruno


Yeh, then send me the code please, that I can integrate it
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

baroen







I am aware this topic is over 2 years old, but there still seem to be no solution for this request.
Quote from: Milbo on November 07, 2016, 16:14:36 PM
Quote from: maxispin on March 23, 2016, 15:42:19 PM
Max if you see this, do you have an opinion? we can speak privately also
What is the problem with the bundle? http://extensions.virtuemart.net/product/product-bundles-detail

The problem with the Breakdesigns Product Bundle plugin is that for each product bundle one needs to create a Customfield - and not a product. That way Custom fields fill up with numerous products, imagine sets of sportshirts and shorts. For each size and color there will be a Custom field created.
The way I think this should function is like Breakdesigns Child Product plugin: create a product, add the Custom field, and then add the products which make up the product bundle from within the main products custom field.
Once the 'mail product' is bought, stock is taken from the sub-products.



Studio 42

Curiously i'm on working on a "child kit" plugin for a customer.
Demo is here http://pro.st42.fr/fr/demo/child-kit/lot-short-shirt.html
I dont implemented stock update for now, because it's a complex and had not the request from my customer.
The child prices are not used in this release, so you can define own price or discount.
It work only for parent having child (from any product in the shop) and the list is get from database so adding child in a product add this in the child Kit list too.