News:

Support the VirtueMart project and become a member

Main Menu

plgvm_istraxx_quantity_vm2.0.20_1.1 is working?

Started by vadim0426, January 22, 2014, 09:45:45 AM

Previous topic - Next topic

vadim0426

Hello,

We use the Istraxx quantity discount plugin to provide a discount based on the number of each product/children that are ordered.

I have some questions:
1. What means this line of code ?  //Todo find the right amount for cart and amount of products

I use quantity spinner on the product details page for choosing quantity of the product before add to cart. But the product price not updating according to my calculation rules. Why? This happens not always time. For example, after I added the product to the cart, then go to the cart page and click update quantity button, then return to the products details page -  price are changing when i choose different quantity. But, for example, when I use Combine childs/Variants option - it's never works for me. Why?
I made code investigation and found some errors when was making code debugging. For example, what is this: [_pkey] => COM_VIRTUEMART__PKEY in record is missing! Can't save the record with no COM_VIRTUEMART__PKEY.
Here full var_dump
VmTableData Object
(
    [_pkey:protected] => virtuemart_calc_id
    [_pkeyForm:protected] => virtuemart_calc_id
    [_obkeys:protected] => Array
        (
            [_pkey] => COM_VIRTUEMART__PKEY in record is missing! Can't save the record with no COM_VIRTUEMART__PKEY.
        )

    [_unique:protected] =>
    [_unique_name:protected] => Array
        (
        )

    [_orderingKey:protected] => ordering
    [_slugAutoName:protected] =>
    [_slugName:protected] =>
    [_loggable:protected] =>
    [_xParams:protected] => 0
    [_varsToPushParam:protected] => Array
        (
        )

    [_translatable] =>
    [_translatableFields:protected] => Array
        (
        )

    [_langTag:protected] =>
    [_tbl_lang:protected] =>
    [_updateNulls:protected] =>
    [_tablePreFix] =>
    [_tbl:protected] => #__virtuemart_calc_plg_istraxx_quantity
    [_tbl_key:protected] => id
    [_db:protected] => JDatabaseMySQL Object
        (
            [name] => mysql
            [nameQuote:protected] => `
            [nullDate:protected] => 0000-00-00 00:00:00
            [dbMinimum:protected] => 5.0.4
            [_database:JDatabase:private] => vadimsandbox
            [connection:protected] => Resource id #32
            [count:protected] => 0
            [cursor:protected] => Resource id #148
            [debug:protected] =>
            [limit:protected] => 0
            [log:protected] => Array
                (
                )

            [offset:protected] => 0
            [sql:protected] => SELECT `#__virtuemart_calc_plg_istraxx_quantity`.*  FROM `#__virtuemart_calc_plg_istraxx_quantity`  WHERE #__virtuemart_calc_plg_istraxx_quantity.`virtuemart_calc_id` = "3"
            [tablePrefix:protected] => j25_
            [utf:protected] => 1
            [errorNum:protected] => 0
            [errorMsg:protected] =>
            [hasQuoted:protected] =>
            [quoted:protected] => Array
                (
                )

        )

    [_trackAssets:protected] =>
    [_rules:protected] =>
    [_locked:protected] =>
    [_errors:protected] => Array
        (
        )

    [id] => 4
    [virtuemart_calc_id] => 3
    [calc_affected] => 0
    [calc_amount_cond] =>
    [calc_amount_cond_min] => a:1:{i:0;s:1:"5";}
    [calc_amount_cond_max] => a:1:{i:0;s:4:"1000";}
    [calc_amount_dimunit] => 0
    [calc_unit] => 0
    [calc_quantity_relvalue] => a:1:{i:0;s:0:"";}
    [combinechilds] => 1

As we see, the combinechilds set to 1, but in plugin code in debuging mode it's 0. Why?

2. This plugin works? it has been tested before sale?

Please, help me.
Thanks,
Best regards, Vadim.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

vadim0426

Thanks for the answer.
I have posted question as you recommended