Home Forums Plugins Product Importer Deluxe Support [Resolved] Help: Product Variations

Welcome to our community support forums! We're here to help - but if you have an urgent request for a Pro Plugin, you will get a prioritised response through our Premium Support page.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #9830
    Anonymous
    Inactive

    so Ive loaded my variations in with the pro version and they do not show up correctly the drop down menu is not listing the variations see : http://mymagshop.com/?wpsc-product=reader-digest

    #9916
    Michael Visser
    Keymaster

    Hi Keith, we’re looking at why variation support is failing in the 3.1.7 Plugin update and hope to have this resolved in the 3.1.9 Plugin update that will immediately follow today/tomorrows update. Can you please get in contact – support@visser.com.au – with your CSV file so we can investigate this further.

    #9975
    Anonymous
    Inactive

    I have the same problem…My WP e-Commerce version is 3.8.8.5 and my Product Importer version is 3.1.8.

    When I upload my CSV, nowhere in frontend is the variations dropdown. When I edit the product, the variations are there(only in administration), but after save, they are not there 🙂 My CSV file is here…please look on it http://importer.knihkupectvo-in.sk/Produkty-na-web4-pouzitelne.csv

    #9978
    janvanherp
    Participant

    Same problem here. I’ve tried to contact you but no reply, which is disappointing.

    my csv has Product Name first then SKD
    The product names are thus >>
    Aero Pendant Lamp Chrome,sk012662…
    Aero Pendant Lamp Chrome|Colour|White,sk012668…
    Aero Pendant Lamp Chrome|Colour|Amber,sk012663…
    This doesn’t set the variation automatically, more or less as described in the post above by web-tech.sk
    If I access the product via the dashboard I can tick the variation (it’s loaded the info here) This adds a drop down on the products page but only the word ‘colour’ displays in the product page dropdown. See here >> http://lumenarte.co.uk/products/lucente/aero-pendant-lamp-chrome/

    In the previous version of your plugin (3.1.7) a single ‘colour’ product was created rather than any variation.
    The only thing that might cause concern is not using the current PHP ‘which does not support the function str_getcsv()’
    I’m on a shared server so have no control over PHP version, although, having read various post on the forum, this shouldn’t matter.

    #10006
    Anonymous
    Inactive

    Hello…today I get information about new update is prepared. I was hoping, the next update fix the product variation problem, but not. It still not working. So I give my time, I was searching, where can be the problem and I find interesting bug. In includes/functions.php on line 2186 is this condition:
    if( $product->is_variation && $product->is_variation != “false” )

    But after change it to something like this
    if( isset($product->is_variation) && $product->is_variation != false )
    Everything works ok. The same condition is used more time in code, so I recommend to replace it everywhere, because the original condition cannot work.

    And the explanation
    The PHP using more ways of compare…but always do the compare of same type of variable(so if the variable type is not the same, the PHP retype one of this vars)

    if( $product->is_variation && $product->is_variation != “false” )
    so, if $product->is_variation has boolean value true the first part of condition return true.

    But the second part no. Because in PHP, when is compared more datatypes, PHP will use the simpliest datatype of all.
    So if($product->is_variation == “false”)
    is in this situation the same like if(true == “false”)
    And this return true. Why? Because you are comparing boolean variable type and string variable. So PHP will transform it to boolean value, something like if(true == (bool)”false”)….and (bool)”false” is has the same value like true….

    so if($product->is_variation != “false”) return false
    And this is the result, why this if( $product->is_variation && $product->is_variation != “false” ) always return false. Because if first part return true, the second part return false and if the first part return false, the second part return true

    PS: Sorry for my English 😉

    #10007
    Anonymous
    Inactive

    You can try anywhere.

    var_dump(false) -> print out false(boolean value)
    var_dump(“false”) -> print out false(string value, this is not same like false in boolean value)

    var_dump((bool)”any string, what I want”) -> print out true(because this string is retyped to boolean value and every non-empty string value after retype to boolean value return true).

    And PHP in condition do exactly the same operation. It is not possible to compare different datatypes. So it is convert it to boolean value

    So this
    if( $product->is_variation && $product->is_variation != “false” )

    is the same condition like this
    if( $product->is_variation && $product->is_variation != (bool)”false” )

    and this is the same condition like this
    if( $product->is_variation && $product->is_variation != true )

    So….the condition never return true

    #10008
    Michael Visser
    Keymaster

    Hi web-tech.sk, thanks for raising this. I’ve forwarded this onto Luke who’s maintaining the new import engine, since we’re using jQuery and passing data back and forth between client and server those true/false as strings are required, we may just need to convert them back to boolean when processing them.

    I’m working on getting variations stable for WP e-Commerce 3.8.8.5 and 3.8.9 in the 3.2.0 Plugin update, this is the sole priority for this Plugin update.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Help: Product Variations’ is closed to new replies.