News:

Support the VirtueMart project and become a member

Main Menu

Multiple Sizes of same product with different prices

Started by BonaFide, August 28, 2012, 09:16:58 AM

Previous topic - Next topic

BonaFide

Have a question related to a single product, with multiple sizes/weights that carry a different price.

I created a parent item with each of the different weights with pricing differential as children of the parent (as per below picture - there are 4 children).

The problem arises on the front end when the client needs to choose a weight to get the pricing.

The first listed child's weight appears as the default with no price. If a client wants to choose the first listed child as the product to purchase, they first need to choose another child's weight for the pricing to appear and then have to choose the weight of the default child weighted product to get its price.

This is an incredibly frustrating method to choose the product. Is there a way to fix this?

Also, the products are listed randomly in the drop down box and not in ascending order according to the weight.



[attachment cleanup by admin]

John2400


BonaFide

Hi John

No, I haven't tried any extensions as yet. Am developing on VM 2.0.10 on Joomla 2.5.6 (and continually updating the versions). I prefer not to use extensions due to the continued rollout of newer versions of the platforms so try and keep things as simple as possible.

I see the extension is built by the inner VM core team. Is this why the functionality is so basic (and literally unworkable)?

John2400

Ha , wow - hope you can edit your post as I think it was developed by the cheif designer.

* The extension will work quite ok - quite a few people try to develop some hacks for VM but remember updates can wipe out many hacks.

* If you are not happy with a extension - any developer will always try and give you some help.

I'm sure he will read that post - and give an answer.

I think I saw some other posts regarding size /weight - I'll post if I see more.

John2400


BonaFide

Quote from: John2400 on August 28, 2012, 10:12:53 AM
Ha , wow - hope you can edit your post as I think it was developed by the cheif designer.


My post wasn't meant to offend anyone, but the lack of functionality in terms of parent/child items does raise a question when the developers are fixing the issues by writing extensions. I have no problem with them making money, but then they should release a basic version of VM and make it obvious that for extended functionality potential users/clients will have to pay for them. The model has been used successfully for other products.

I have found a number of posts on this forum related to this issue where the developers haven't exactly bent over backwards to answer the questions raised or to at least advise that that the functionality is limited and that to extend it, one would need to purchase a 3rd party extension (either written by them or another developer).

Found this thread similarly related to the same topic: http://forum.virtuemart.net/index.php?topic=100330.0

ivus

Hi BonaFide,

You've eliminated your only 2 options in having this problem fixed.

  • No extensions, because you update regularly and are concerned about the effects this may have
  • therefore, No hacks, because you update regularly and are concerned about the effects this may have
I understand your frustrations, but what other options are left?

BonaFide

Quote from: ivus on August 28, 2012, 18:37:07 PM
Hi BonaFide,

You've eliminated your only 2 options in having this problem fixed.

  • No extensions, because you update regularly and are concerned about the effects this may have
  • therefore, No hacks, because you update regularly and are concerned about the effects this may have
I understand your frustrations, but what other options are left?
Morning Ivus

On the face of it, yes  :)

To be honest the option I am considering is continuous hacks of the code as this, whilst frustrating, is at least cost effective as opposed to having to pay for an extension and then having the frustration of still having to hack due to upgrades.

The best option would be for the developers to either do something to rectify the issue as has been requested since 2 was released in various threads dotted around this board or, at worst, at least state that they are not going to do anything about it as it is not a function they deem worthy of incorporating due to the sale of various plugin's (some of which have been developed by themselves). Remaining silent and ignoring the various issues raised is pretty much akin to giving users the middle finger.

ivus

Hi BonaFide,

Fair enough.

To fix the select list issue, open the following file

/administrator/components/com_virtuemart/models/customfields.php @ line 1038, inside this function "public function displayProductCustomfieldFE(){}"

look for this code:


switch ($type) {

case 'A':

$options = array();

$session = JFactory::getSession ();
$virtuemart_category_id = $session->get ('vmlastvisitedcategoryid', 0, 'vm');



and add 1 extra line directly after "$options = array()"



switch ($type) {

case 'A':

$options = array();
$options[] = array('value' => '', 'text' => '- Select -');

$session = JFactory::getSession ();
$virtuemart_category_id = $session->get ('vmlastvisitedcategoryid', 0, 'vm');



As far as this is concerned:
QuoteAlso, the products are listed randomly in the drop down box and not in ascending order according to the weight.

It works as expected for me.


vmdebug getUncategorizedChildren
SELECT * FROM `#__virtuemart_products` as p
LEFT JOIN `#__virtuemart_products_en_gb` as pl
USING (`virtuemart_product_id`)
LEFT JOIN `#__virtuemart_product_categories` as pc
USING (`virtuemart_product_id`)
WHERE `product_parent_id` = "1"
GROUP BY `virtuemart_product_id`
ORDER BY ordering DESC


Good luck with all this.  ;)

BonaFide

Much appreciated Ivus  :)

Will give it a bash and let you know whether it works.