News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Product Options Custom Field Dropbox Plugin (Updated)

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

Previous topic - Next topic

evano666

 Hi BanquetTables.pro

Firstly, thank you for this awesome plugin.  I have around 500 products in the store I am developing so this is a MASSIVE time saver for me!

I do have one problem with it though.  I have setup a rule for colours using your plugin.  I had previously set it up using the standard custom fields way.

Using this previous method, when a colour variant was selected, in the cart, it would list this under the product - I.e
Chiro Support Single Set
Base Colour - Navy

Using your plugin is shows it as such -

Chiro Support Single Set
Base Colour

Is there a reason for this?

Many thanks

evano

jingle0

ya, still not working for me.  I'm not sure we're talking about the same thing.

If I use your previous version I see 2 lines of text, 1 being the headers of the custom fields (no values) and the other being headers and values (these are what are selected by the customer).  I've reviewed the custom field content and it complies with what you said regarding the formatting.  Unfortunately I still get the same thing.  If I upgrade to your new version I don't get anything but the custom field headers .. no values, no formatting.  So what am I doing wrong?

razvanadrian

hi,

Your plugin is very close to what i need, can you help me customize/modify it a little bit to meet my needs?

i am selling printed stuff, here is what i need, on the product page i need to have 2 dropboxes, first one u choose the material (canvas, paper, etc) and in the second one choose the dimensions, according to this, price changes, and what i have in the second dropbox depends on what i choose in the first one.

can i have this with your pligin? and a some customization?

thx a lot

PRO

Quote from: razvanadrian on June 18, 2012, 18:08:39 PM
hi,

Your plugin is very close to what i need, can you help me customize/modify it a little bit to meet my needs?

i am selling printed stuff, here is what i need, on the product page i need to have 2 dropboxes, first one u choose the material (canvas, paper, etc) and in the second one choose the dimensions, according to this, price changes, and what i have in the second dropbox depends on what i choose in the first one.

can i have this with your pligin? and a some customization?

thx a lot


No, I think you might need to use "child products"

razvanadrian

Quote from: BanquetTables.pro on June 18, 2012, 21:07:56 PM
Quote from: razvanadrian on June 18, 2012, 18:08:39 PM
hi,

Your plugin is very close to what i need, can you help me customize/modify it a little bit to meet my needs?

i am selling printed stuff, here is what i need, on the product page i need to have 2 dropboxes, first one u choose the material (canvas, paper, etc) and in the second one choose the dimensions, according to this, price changes, and what i have in the second dropbox depends on what i choose in the first one.

can i have this with your pligin? and a some customization?

thx a lot


No, I think you might need to use "child products"


out of the question, i have hundreds of items maybe more then a thousand. i need something like a template or a plugin to just add it. i will add the products using a component that automatically makes products out of pictures u just put them in some folders and BAM! u have the products. i cant make 3-4 child products for every item.

i tried to use a form extension to add it as a sidebar module but i dont know how to get that form to change the price when i choose something. do you have any idea how to do that? point me to some direction at list?

freshwebservices

Hi,
I'm having a frustrating issue getting this plugin to work. This is probably my lack of understanding . Here's what I'm trying to do:
1) Apply the same set of options to various products
2) Depending upon the option selected the price should be +/-

So, I've created a custom field of type: Plugin - VMCustom - Dropbox
Set it to be Cart Attribute
Set the options to be: General Waste,Soil and Bricks|-5,Soil Only| -5,Bricks Only| -10, Metal| -25,Cardboard| -25

When I save it the options are not saved  :(

So, within my product I add the custom field & enter the option values there:

These then appear on the front end, but selecting one of them does not update the price.

Any suggestions what I might be doing wrong?

Thanks & much appreciated,

Eddie

J! 2.5.4
VM 2.0.6
Php 5.2.16

[attachment cleanup by admin]
Leicester Joomla & Magento developer

PRO

Quote from: freshwebservices on June 19, 2012, 17:06:57 PM
Hi,
I'm having a frustrating issue getting this plugin to work. This is probably my lack of understanding . Here's what I'm trying to do:
1) Apply the same set of options to various products
2) Depending upon the option selected the price should be +/-

So, I've created a custom field of type: Plugin - VMCustom - Dropbox
Set it to be Cart Attribute
Set the options to be: General Waste,Soil and Bricks|-5,Soil Only| -5,Bricks Only| -10, Metal| -25,Cardboard| -25

When I save it the options are not saved  :(

So, within my product I add the custom field & enter the option values there:

These then appear on the front end, but selecting one of them does not update the price.

Any suggestions what I might be doing wrong?

Thanks & much appreciated,

Eddie

J! 2.5.4
VM 2.0.6
Php 5.2.16

The "template" will not save the +20   etc.

It stopped doing that a while back.

It5 will only save

red,Greeen,Yellow

If you want to do the same attributes with variations in price.

Create an empty one,


copy and past into the product

ERNIK

#247
Hi BanquetTables.pro,

As you may already know, your custom field plug-in is awesome but something broke it. 

I don't know if it was J2.5.5 or VM2.0.6 but the item chosen from the custom drop down list just doesn't show up in the cart.  I installed your plug-in today without problems and works as per your instructions except for that detail on the shopping cart.

Is there a possible solution to this?  I hope so, please update us. 

Thanks,

ERNIK


freshwebservices

Hi BanquetTables.pro,
Thanks for your prompt response - much appreciated.

I have also tried to cut n paste into an empty one at the product level. While this show up on the front end, it does not alter the product price.

As you can see from the screenshots, the "Licence" field has 2 values: "Off Road, On Road|+35"
On the front end, the Licence field is there, with the 2 options, but selecting "On Road" does not alter the price.

There are two errors that that are output. The first is output to screen:
Notice: Undefined property: stdClass::$virtuemart_customfield_id in /Applications/MAMP/htdocs/bakers-live/plugins/vmcustom/drop/drop.php on line 61

The second can be seen via XHR firebug console:
<b>Notice</b>:  Undefined index:  10 in <b>/Applications/MAMP/htdocs/bakers-live/administrator/components/com_virtuemart/plugins/vmcustomplugin.php</b> on line <b>223</b><br />
<br />
<b>Notice</b>:  Undefined index:  11 in <b>/Applications/MAMP/htdocs/bakers-live/administrator/components/com_virtuemart/plugins/vmcustomplugin.php</b> on line <b>223</b><br />
<br />
<b>Notice</b>:  Undefined index:  12 in <b>/Applications/MAMP/htdocs/bakers-live/administrator/components/com_virtuemart/plugins/vmcustomplugin.php</b> on line <b>223</b><br />
{"basePrice":"\u00a390.00","basePriceVariant":"\u00a390.00","basePriceWithTax":"","discountedPriceWithoutTax":"","priceBeforeTax":"\u00a390.00","salesPrice":"\u00a390.00","taxAmount":"","salesPriceWithDiscount":"","salesPriceTemp":"\u00a390.00","discountAmount":"","priceWithoutTax":"\u00a390.00","variantModification":"","DBTax":"\u00a390.00","Tax":"\u00a390.00","DATax":"\u00a390.00"}


I'm not sure if any of these are significant!

Any help is much appreciated.

Regards,

J! 2.5.4
VM 2.0.6
PHP 5.2.16

[attachment cleanup by admin]
Leicester Joomla & Magento developer

ERNIK

Tried it. That new version of customfields.php did not allow any custom field to be added to the product.  (VM 2.0.6 installed and J! 2.5.5).

PRO

Quote from: freshwebservices on June 20, 2012, 10:11:27 AM
Hi BanquetTables.pro,
Thanks for your prompt response - much appreciated.

I have also tried to cut n paste into an empty one at the product level. While this show up on the front end, it does not alter the product price.

As you can see from the screenshots, the "Licence" field has 2 values: "Off Road, On Road|+35"
On the front end, the Licence field is there, with the 2 options, but selecting "On Road" does not alter the price.

There are two errors that that are output. The first is output to screen:
Notice: Undefined property: stdClass::$virtuemart_customfield_id in /Applications/MAMP/htdocs/bakers-live/plugins/vmcustom/drop/drop.php on line 61

The second can be seen via XHR firebug console:
<b>Notice</b>:  Undefined index:  10 in <b>/Applications/MAMP/htdocs/bakers-live/administrator/components/com_virtuemart/plugins/vmcustomplugin.php</b> on line <b>223</b><br />
<br />
<b>Notice</b>:  Undefined index:  11 in <b>/Applications/MAMP/htdocs/bakers-live/administrator/components/com_virtuemart/plugins/vmcustomplugin.php</b> on line <b>223</b><br />
<br />
<b>Notice</b>:  Undefined index:  12 in <b>/Applications/MAMP/htdocs/bakers-live/administrator/components/com_virtuemart/plugins/vmcustomplugin.php</b> on line <b>223</b><br />
{"basePrice":"\u00a390.00","basePriceVariant":"\u00a390.00","basePriceWithTax":"","discountedPriceWithoutTax":"","priceBeforeTax":"\u00a390.00","salesPrice":"\u00a390.00","taxAmount":"","salesPriceWithDiscount":"","salesPriceTemp":"\u00a390.00","discountAmount":"","priceWithoutTax":"\u00a390.00","variantModification":"","DBTax":"\u00a390.00","Tax":"\u00a390.00","DATax":"\u00a390.00"}


I'm not sure if any of these are significant!

Any help is much appreciated.

Regards,

J! 2.5.4
VM 2.0.6
PHP 5.2.16


First backup your file.

THEN,

download the customfields.php
https://dev.virtuemart.net/svn/virtuemart/trunk/virtuemart/administrator/components/com_virtuemart/models/

JUST right click, ad save as php

and try the newest version.


I have no idea why it does not work,

PRO

Quote from: ERNIK on June 20, 2012, 21:59:52 PM
Tried it. That new version of customfields.php did not allow any custom field to be added to the product.  (VM 2.0.6 installed and J! 2.5.5).

I was not talking to you with that post

Quote from: ERNIK on June 20, 2012, 00:41:43 AM
Hi BanquetTables.pro,

As you may already know, your custom field plug-in is awesome but something broke it. 

I don't know if it was J2.5.5 or VM2.0.6 but the item chosen from the custom drop down list just doesn't show up in the cart.  I installed your plug-in today without problems and works as per your instructions except for that detail on the shopping cart.

Is there a possible solution to this?  I hope so, please update us. 

Thanks,

ERNIK




ALSO:::::I am using J2.5.5 + Vmart 2.07


EricaS0328

Ok, my web developer kinda up & left me so I am stuck trying to figure out some of these things on my own now. I am using VM 2.0.6 with Joomla 1.5.20... I am stuck because I need to be able to add variables to almost every product I sell and every variable changes the price. I miss VM 1.0 dearly ((Sigh)). My website is www.nolafooddelivery.com if you want to have a look at the mess VM 2.0 left me in..

Where do I get this plug-in & can you tell me in lesser being terms how to install it, please?

Erica

P.S..
Any other helpful articles/information you think I need I would appreciate that too :)

freshwebservices

Hi BanquetTables.pro,
Thanks for your earlier assistance. I overwrote the file as suggested but no progress I'm afraid.

I've also tried a different template but w/o success. So I've turned on debugging & here's what it reports:

With regard to this error/warning:

Notice: Undefined index: 10 in /Applications/MAMP/htdocs/bakers-live/administrator/components/com_virtuemart/plugins/vmcustomplugin.php on line 223


I add a debug statement to this file:
administrator/components/com_virtuemart/plugins/vmcustomplugin.php

/**
    * Calculate the variant price by The plugin
    * override calculateModificators() in calculatorh.
    * Eg. recalculate price by a quantity set in the plugin
    * You must reimplement modifyPrice() in your plugin
    * or price is returned defaut custom_price
    */
    // public function plgVmCalculatePluginVariant( $product, $field,$selected,$row){
    public function getCustomVariant($product, &$productCustomsPrice,$selected){
if ($productCustomsPrice->custom_element !==$this->_name) return false;
                vmdebug('$product', &$productCustomsPrice,$selected); //ECM 21/6/2012
vmPlugin::declarePluginParams('vmcustom',$productCustomsPrice->custom_element,$productCustomsPrice->custom_jplugin_id,$productCustomsPrice);
// VmTable::bindParameterable($productCustomsPrice,'custom_params',$this->_varsToPushParam);

$pluginFields = JRequest::getVar('customPlugin',null );
if ($pluginFields ==  null) $pluginFields = json_decode( $product->customPlugin, true);

return $pluginFields[$productCustomsPrice->virtuemart_custom_id][$this->_name] ;//line 223

    }


The debug ouptput is as follows:

vmdebug $product Var1:

stdClass Object
(
    [virtuemart_custom_id] => 10
    [custom_parent_id] => 9
    [virtuemart_vendor_id] => 1
    [custom_jplugin_id] => 10031
    [custom_element] => drop
    [admin_only] => 0
    [custom_title] => Waste Type
    [custom_tip] => Please select the type of waste to be put in the skip
    [custom_value] => waste
    [custom_field_desc] =>
    [field_type] => E
    [is_list] => 0
    [is_hidden] => 0
    [is_cart_attribute] => 1
    [layout_pos] =>
    [custom_params] => custom_drop="General Waste,Soil and Bricks|-5,Soil Only| -5,Bricks Only| -10, Metal| -25,Cardboard| -25"|custom_drop_name="Waste Type"|
    [shared] => 0
    [published] => 0
    [created_on] => 2012-06-21 08:20:03
    [created_by] => 68
    [ordering] => 0
    [modified_on] => 2012-06-21 08:20:03
    [modified_by] => 68
    [locked_on] => 0000-00-00 00:00:00
    [locked_by] => 0
    [virtuemart_customfield_id] => 43
    [virtuemart_product_id] => 6
    [custom_price] =>
    [custom_param] => {"custom_drop_name":"Waste Type","custom_drop":"General Waste,Soil and Bricks|-5,Soil Only|-5,Bricks Only|-10, Metal|-25,Cardboard|-25"}
)

Array
(
)

Var2: 43


As you can see, [custom_price] is empty. So, altho' the option 'Cardboard|-25' has been selected, its not populating or being picked up.

Any suggestions where to go next would  be much appreciated.
Thanks for your time,
Eddie
Leicester Joomla & Magento developer

hollowGod

Hi BanquetTables.pro,

is it possible to get the plugin to warn you or not let you add product to cart before you have changed value in the dropbox?
i.e. if I have the values : --Select--,XXL,XL,L,M .. it would promt the customer to change size if they click add to cart without selecting size first..

How is the default value supposed to work ? I set it to L, but in my product page I still see --Select-- as first value. I tried with XXL,XL,L,M but same result.

Thanks for a great plugin.

regards,

hollowGod