News:

Support the VirtueMart project and become a member

Main Menu

Product Options Custom Field Dropbox Plugin (Updated)

Started by PRO, March 16, 2012, 11:52:11 AM

Previous topic - Next topic

Bodeha

Hi
I have problem:

i cant write more like 255 character on filed.

u use default or overdrive style but this is same problem.

VM2 2.20  J.2.59

Please help:)

PRO


Bodeha

Thank you very much. its work:)

btw thx for your work and plug-in , its great:)

Best Regards from Poland;)

realistix

Okay,

I wasn't going mad, it just doesn't seem to apply to every product or all of the time. As it currently stands the drop box is not updatin gthe price or adding the extra to the cart on this product http://www.mobilityproducts4u.org/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=424

Any ideas why??

Thanks

PRO

Quote from: realistix on April 01, 2013, 20:23:17 PM
Okay,

I wasn't going mad, it just doesn't seem to apply to every product or all of the time. As it currently stands the drop box is not updatin gthe price or adding the extra to the cart on this product http://www.mobilityproducts4u.org/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=424

Any ideas why??

Thanks

I guess first thing is to look in the actual product and see if its formatted correctly

realistix

#395
Well,this is the value in the dropbox selections field:

18 inches,19 inches|+25,22 inches|+50

That all correct?

I've noticed that the product price does dim for a moment when selecting a different option in the drop box so the "onchange" action is essentially working, just not applying the price change.

PRO

Quote from: realistix on April 02, 2013, 11:05:02 AM
Well,this is the value in the dropbox selections field:

18 inches,19 inches|+25,22 inches|+50

That all correct?

I've noticed that the product price does dim for a moment when selecting a different option in the drop box so the "onchange" action is essentially working, just not applying the price change.

are these child products?

I know some people have had problems using with child products

realistix


PRO

Quote from: realistix on April 02, 2013, 18:06:24 PM
No, no child products on this site at all.

show me 1 that works?

LOoks like it might be a java issue,

realistix

Nope, I can't find a single one that works now. This is just bizarre.

PRO

Quote from: realistix on April 05, 2013, 11:40:00 AM
Nope, I can't find a single one that works now. This is just bizarre.

You have something conflicting


realistix

Hi Pro,

just to let you know the isue is resolved. There was another plugin which had a function by the same name which was obviously stopping it from working. Thanks so much for your help and for the fantastic plugin.

PRO

Quote from: realistix on April 10, 2013, 12:41:44 PM
Hi Pro,

just to let you know the isue is resolved. There was another plugin which had a function by the same name which was obviously stopping it from working. Thanks so much for your help and for the fantastic plugin.

which one?

and which function?

swanson22

We downloaded and modified your plugin to act as a multiplier as well but can't seem to find the variable to make the plugin reference the the multipliers we put in instead of multiplying based on base price. Would you happen to know or be able to tell us the variable we need to enter or look for to change this so the plugin will multiply based off of our new multipliers vs. base price. Right now we have it multiplying based off of percents so we use *0.045, 1.275, 0.5 and so on in order to get the correct prices. Any help is much appreciated thanks.

PRO

Quote from: swanson22 on April 16, 2013, 04:52:07 AM
We downloaded and modified your plugin to act as a multiplier as well but can't seem to find the variable to make the plugin reference the the multipliers we put in instead of multiplying based on base price. Would you happen to know or be able to tell us the variable we need to enter or look for to change this so the plugin will multiply based off of our new multipliers vs. base price. Right now we have it multiplying based off of percents so we use *0.045, 1.275, 0.5 and so on in order to get the correct prices. Any help is much appreciated thanks.

is this what you need?
http://extensions.virtuemart.net/products/custom-size-detail



&&

here is the price function

   public function plgVmCalculateCustomVariant($product, &$productCustomsPrice,$selected){
      if ($productCustomsPrice->custom_element !==$this->_name) return ;
      $customVariant = $this->getCustomVariant($product, $productCustomsPrice,$selected);
      $this->parseCustomParams($productCustomsPrice);
      $productCustomsPrice->custom_price = 0 ;
      if ( isset ($customVariant['custom_drop'])) {
         $options = explode(',', $productCustomsPrice->custom_drop);
         foreach ($options as $valuesWithPrice) {
            $valueWithPrice = explode('|', $valuesWithPrice);

            if ( $customVariant['custom_drop'] == $valueWithPrice[0])  {
               if ( isset ($valueWithPrice[1]) ) {

                  $op = $valueWithPrice[1][0];
                  if ($op == '+') $productCustomsPrice->custom_price =(float) substr($valueWithPrice[1], 1);
                  // testing equals
                  else if ($op == '=') $productCustomsPrice->custom_price = -$product->product_price+(float) substr($valueWithPrice[1], 1);
                  // end test equals
                  else if ($op == '-') $productCustomsPrice->custom_price = -(float) substr($valueWithPrice[1], 1);
                  else $productCustomsPrice->custom_price =(float) $valueWithPrice[1] ;

               }
                  return ;
            }

         }
      }
//          return $field->custom_price;

   }



if you look here

// testing equals
                  else if ($op == '=') $productCustomsPrice->custom_price = -$product->product_price+(float) substr($valueWithPrice[1], 1);
                  // end test equals

You ca see how I subtract the product price & add the equals

So, you should be able to see how to do yours