News:

Support the VirtueMart project and become a member

Main Menu

Bug Custom field type Plugin with Stock control

Started by sucuisine, October 07, 2012, 17:21:10 PM

Previous topic - Next topic

sucuisine

Hi,

I am using Joomla 2.7 and VM 2.0 10.

I have defined a parent with 8 children  (100 ml Spicy, 100 ml not spicy, 250 ml spicy, 250 ml not spicy, etc) and a custom field (plugin and stock control) to be able to choose these variants in the detail product page (see image below). The extra charge field at custom field is left empty and the price defined at the child product is displayed when choosing the variant.

The first variant (100 ml) has a price of 1.60 and last variant (1000ml) the price of 13.75

Issue 1
When the parent product is selected the first variant 100 ml is being displayed. But there is something strange with the price: the corresponding price of 1.60 is displayed  after displaying 1 milliseconds the price of 13.75 (flickering). Sometimes this end with the price of the last variant (1000ml) 13.75 whereas the default variant of 100 ml is being displayed. But when adding this product in the cart the right product and price is displayed in cart.
This is only happening the first time opening the detail product page.  (Additional information: i am using the prices of the child products and the additional charge field in the custom tab of the parent is empty.

How can we change VM that there is no changing of the price (no flickering) and always the right price is being displayed.

Issue 2:
VM displays in Best product or New product of the child products-name (the variants) with the images of the parent. I had expected the parent product to be displayed here because the child products are only variants without any images etc. When clicking child product the detail product page is displayed with the name of the child. Here we can change the variants and corresponding the price is changing. When adding to the cart the child name is placed in the cart not corresponding with the chosen variant.
This is working fine if a parent is chosen from general VM view: category with products

How can we configure VM to display the parent product in the views Best Products and New products?

Who can help me resolving these issues??



Regards Developer SuCuisine






[attachment cleanup by admin]

OpenGlobal

Quote from: sucuisine on October 07, 2012, 17:21:10 PM
The extra charge field at custom field is left empty and the price defined at the child product is displayed when choosing the variant.

That is not supported and will not work.

Everything in the child products should be empty except for the name, SKU and stock level.

OpenGlobal

sucuisine

#2
Hi OpenGlobal

Regarding issue 1
I have cleared everything in the child product except, name, sku, stock en weight. And added 'extra charge" at the parent product  in the custom field tab for the variants.  The first variant has a value of 0, ( in this case the price of the parent is being displayed) the second variant has a extra charge of 1.93 etc.

I have still the same issue? Price is flickering (changing 1 milisecond) and most of the time is changed to the right price and sometime the wrong price is displayed (always the price of the last variant)


Pls be informed I am using Stock control and not Stockable variants. (The reason for this is that the variants are not stored when a custom field is created of the type Plugin and stockable variant)

When a wrong price is displayed with a variant (eg 100 ml) and I add this in the cart than the price of 100 ml (right price) is displayed in the cart.

This issue has only something to do with displaying on the screen. And occures only if a detail product is activated from the menu of home page. When changing the variants within the detail product page the price is displayed correct.

Please see, by clicking on the link below, the values of the second product is made empty as you advised
http://www.sucuisine.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=1&Itemid=254
http://www.sucuisine.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=12&Itemid=264



Second Issue
Do you have a solution for the second issue

Regards

sucuisine

Hi
I have a workaround that seems to work, but I am not sure.

The problem was that price of the first variant changed into the LAST variant: eg: the price of 100 ml is changed into the price of 1000 ml, whereas the variant 100ml is selected at default when the product page is displayed. Remark: this is the case when the first time de product page is opened. When explicitly changed the variant to 100 ml (with the price of 1000 ml displayed) then it is fine, the price is displayed correct.
Workaround: I have unpublished the last variant and the last child product. Now the  price is not changing to the last variant, but I am not 100% sure if this is a workaround for the bug.

Perhaps it is better to check the code and to be sure if there is a issue with the first and last variant and if the workaround will work for 100%

Still no help from anybody

Regards