• sostoss

    (@sostoss)


    Hi scroutz requested that we give them the weigh of each product

    Για ?να προ??ν με β?ρο? 3.2kg, η τιμ? του πεδ?ου β?ρου? θα ε?ναι:

    <weight>3200</weight>
    ?

    <weight>3.2 kg</weight>

    Αλλ? το Plugin δεν βγ?ζει αυτ? το πεδ?ο.

    Ευχαριστ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter sostoss

    (@sostoss)

    From what i’ve read it is a new scroutz request, any updates?

    Thank you

    Plugin Author mpbm23

    (@mpbm23)

    This needs a new update. Although it will take a while before it is implemented.

    Hello,
    This is very usefull if can be added to a future update.
    (As soon as posible) hehe!

    ?κανα τι? εξ?? αλλαγ?? στο createsk.php και δουλε?ει μια χαρ? το πεδ?ο “weight”.
    Συγκεκριμ?να:

    1. Μετ? τη γραμμ? κ?δικα
    $skus = $wpdb->get_results($skusql);

    πρ?σθεσα

    $weightsql = $wpdb->prepare(  "SELECT *
    	FROM " . $wpdb->prefix . "postmeta
    	WHERE <code>post_id</code> =" . $prod->ID . " AND <code>meta_key</code> LIKE '_weight';",0);
      $weights = $wpdb->get_results($weightsql);

    2. Μετ? τη γραμμ? κ?δικα
    $sku = $skus[0];

    πρ?σθεσα
    $weight = $weights[0];

    και
    3. Μετ? απ? εδ?

     if (strcmp($attr[0]->meta_value, "a:0:{}")) {
                    $product->addChild('size', substr($sizestring, 0, -2));
                }

    πρ?σθεσα

     $product->weight = NULL;            
      $product->weight->addCData($weight->meta_value);

    και φυσικ? στο αντ?στοιχο πεδ?ο κ?θε προ??ντο? συμπλ?ρωσα το β?ρο?.

    • This reply was modified 7 years, 6 months ago by disi13.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘weight field’ is closed to new replies.