vbotto
Forum Replies Created
-
Forum: Plugins
In reply to: [Packeta] ID pobocky a hmotnost do superfakturyAno, dakujem, hodnotu PointId som si vybral z databazy tak ako pisete, na spocitanie hmotnosti som pouzil funkciu:
function my_get_total_order_weight( $order_id ) { $order = wc_get_order( $order_id ); $order_items = $order->get_items(); $total_qty = 0; $total_weight = 0; foreach ( $order_items as $item_id => $product_item ) { $product = $product_item->get_product(); if ( ! $product ) continue; $product_weight = $product->get_weight(); $quantity = $product_item->get_quantity(); $total_qty += $quantity; if ($product_weight) { $total_weight += floatval( $product_weight * $quantity ); } } return $total_weight; }
A tieto dve hodnoty som nasledne priradil k vlasnostiam objednavky:
update_post_meta( $order->get_id(), 'zasilkovna_id_pobocky', $zasilkovna_id_pobocky ); update_post_meta( $order->get_id(), 'zasilkovna_custom_weight', $zasilkovna_custom_weight );
A vsetko funguje tak ako som potreboval, superfaktura si to z tychto vlastnosti objednavky automaticky zoberie.
Dakujem.
Forum: Plugins
In reply to: [Packeta] Zaokruhlenie hmotnosti balikaDobry den,
zda sa, ze zaokruhlovanie naozaj funguje tak ako ste popisovali predtym a hmotnost zostane zaokruhlena na max 3 desatinne miesta a tym padom to prejde v poriadku. Co sa tyka toho mojho predchadzajuceho problemu tak sa zda, ze sme si nie celkom dobre rozumeli pri definovani problemu s klientom a preto vzniklo take mensie nedorozumenie.
Kazdopadne sprevadzkovanie filtru packeta_create_packet je vyborne doplnenie funkcionality, ktore v buducnosti urcite vyuzijeme. Ak by bol nejaky problem dam potom vediet.
Dakujem.
Hello,
I got also problem with generated avif images by Shortpixel, they act as broken images in Chrome Version 96.0.4664.45 (Official Build) (64-bit).
You can find original picture here => https://2a2.sk/img/1.png and one that is generated by Shortpixel is here => https://2a2.sk/img/1.avif
As you can see, it is issue only in Chrome, I can view avif in Firefox and edge too.
Forum: Plugins
In reply to: [WPify Woo Czech] Nepovolena hodnota pro menu CZKDokonale! Dakujem, ak by bol nejaky problem, tak dam vediet.
Forum: Plugins
In reply to: [WPify Woo Czech] Nepovolena hodnota pro menu CZKAno, rozumiem, plugin ktory sme pre zasielkovnu pouzivali predtym tuto hodnotu automaticky zakruhlil, napriklad ak bola objednavka v hodnote 443.80 CZK, tak do zasilkovne sa poslala dobierka na hodnotu 444.00 CZK.
Vedeli by ste ma nasmerovat ak by som chcel rovnaku funcionalitu dosiahnut aj pri WPify Woo?