newshop
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Seperate variation info from product nameThere is this part in cart.php and I think that this outputted the cart item meta in previous versions but it seams to be deprecated:
// Meta data echo WC()->cart->get_item_data( $cart_item );So why is it still there and how can I get the cart item meta separated from the cart item name?
Forum: Plugins
In reply to: [WooCommerce] input quantity next to productI was using the provided code in combination with the following code (found it here: https://gist.github.com/mikaelz/f41e29c6a99a595602e4) to auto update the cart after quantity changed and it worked well until woocommerce version 3.0. But with woocommerce 3.0.X, it works only for every second update. So if I change the quantity, it does not update. If I change it again, it does update. Any idea how to fix this? Many thanks!
add_action( 'wp_footer', 'cart_update_qty_script' ); function cart_update_qty_script() { if (is_cart()) : ?> <script> jQuery('div.woocommerce').on('change', '.qty', function(){ jQuery("[name='update_cart']").removeAttr('disabled'); jQuery("[name='update_cart']").trigger("click"); }); </script>Forum: Plugins
In reply to: [WooCommerce] Seperate variation info from product nameIsnt there anybody with the same issue or anybody who could help? 🙁
Hallo,
ich wollte mal nachfragen ob du das oben beschriebene Problem rekonstruieren kannst und weißt was ich meine?
Danke und viele Grüße!Its solved. Updating woocommerce from 3.0.3 to 3.0.4 fixed it 🙂
I dont know if the error message I see in chrome console is related to this problem but here it is:
Uncaught TypeError: Cannot read property 'length' of null at HTMLFormElement.<anonymous> (etheme.js:1439) at HTMLFormElement.dispatch (jquery.js:3) at HTMLFormElement.r.handle (jquery.js:3) at Object.trigger (jquery.js:3) at Object.a.event.trigger (jquery-migrate.min.js:2) at HTMLFormElement.<anonymous> (jquery.js:3) at Function.each (jquery.js:2) at a.fn.init.each (jquery.js:2) at a.fn.init.trigger (jquery.js:3) at HTMLFormElement.e.onFindVariation (add-to-cart-variation.min.js:1)The source is the code part of the file etheme.js that I posted above, one week ago. The problem only exists for variable products. For simple products the trigger works like it should.
The theme authors say that the new theme version would fix this but it did not. So I hope that you have an idea…many thanks in advance.Forum: Plugins
In reply to: [Germanized for WooCommerce] “Weiter zur Kasse ohne Kundenkonto?” bearbeitenOk danke, so könnte ich den deutschen Wortlaut ändern (wobei ich es am liebsten auch im Englischen ändern würde…) aber wie füge ich am besten eine Überschrift hinzu? Das möchte ich ungern über die Sprachdateien machen weil die Überschrift ja auch übersetzt werden soll..
Viele Grüße!- This reply was modified 9 years, 1 month ago by newshop.
Forum: Plugins
In reply to: [WooCommerce] Show product excerpt/ short description in cart & checkoutHm, but it only works with variable products. For simple products, there is this error:
Fatal error: Call to a member function get_short_description() on boolean in …/wp-content/themes/childtheme/woocommerce/cart/cart.php on line 85Super, danke, damit ist die Checkbox wieder da.
Allerdings ist mir ein anderer Fehler aufgefallen, der auch in deinem Demoshop da ist, d.h. es liegt nicht an meinen individuellen Anpassungen:
Wenn man zur Kasse geht und dann den Haken bei “Lieferung an eine andere Adresse senden?” setzt, erscheint u.a. das Adressfeld “Adresse”, placeholder Straße (=shipping_address_1) und darunter placeholder Wohnung, Appartment… (=shipping_address_2). Bis hier ist alles normal.
Wenn man aber nun die Checkbox “An DHL Paketshop oder Packstation senden?” aktiviert und danach wieder deaktiviert, fehlt das Feld für die shipping_address_2, d.h. die Adresse hat dann nur noch das Feld Straße, aber nicht mehr Wohnung, Appartment…
Weißt du was ich meine und hast du eine Idee wie man den Fehler beheben könnte?Forum: Plugins
In reply to: [WooCommerce] Show product excerpt/ short description in cart & checkoutYeah, you are a genius 🙂
That worked, thank you so much!Forum: Plugins
In reply to: [WooCommerce] Show product excerpt/ short description in cart & checkoutThank you. I dont know how to see this. I added the code to my testpage’s cart.php and that outputtet the following:
object(WC_Product_Variation)#9370 (14) { ["post_type"]=> string(17) "product_variation" ["parent_data":protected]=> array(12) { ["title"]=> string(26) "Cava Basic Polygon (Kopie)" ["sku"]=> string(0) "" ["manage_stock"]=> string(2) "no" ["backorders"]=> string(2) "no" ["stock_quantity"]=> string(0) "" ["weight"]=> string(0) "" ["length"]=> string(0) "" ["width"]=> string(0) "" ["height"]=> string(0) "" ["tax_class"]=> string(0) "" ["shipping_class_id"]=> int(0) ["image_id"]=> string(3) "251" } ["object_type":protected]=> string(7) "product" ["cache_group":protected]=> string(8) "products" ["data":protected]=> array(48) { ["name"]=> string(50) "Cava Basic Polygon (Kopie) – iPhone 7, 6, 6s" ["slug"]=> string(41) "variante-647-von-cava-basic-polygon-kopie" ["date_created"]=> object(WC_DateTime)#9379 (4) { ["utc_offset":protected]=> int(0) ["date"]=> string(26) "2017-01-04 13:04:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Berlin" } ["date_modified"]=> object(WC_DateTime)#9378 (4) { ["utc_offset":protected]=> int(0) ["date"]=> string(26) "2017-01-04 13:04:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Berlin" } ["status"]=> string(7) "publish" ["featured"]=> bool(false) ["catalog_visibility"]=> string(7) "visible" ["description"]=> string(0) "" ["short_description"]=> string(0) "" ["sku"]=> string(0) "" ["price"]=> string(2) "39" ["regular_price"]=> string(2) "39" ["sale_price"]=> string(0) "" ["date_on_sale_from"]=> NULL ["date_on_sale_to"]=> NULL ["total_sales"]=> string(1) "0" ["tax_status"]=> string(7) "taxable" ["tax_class"]=> string(6) "parent" ["manage_stock"]=> bool(true) ["stock_quantity"]=> int(1) ["stock_status"]=> string(7) "instock" ["backorders"]=> string(2) "no" ["sold_individually"]=> bool(false) ["weight"]=> string(0) "" ["length"]=> string(0) "" ["width"]=> string(0) "" ["height"]=> string(0) "" ["upsell_ids"]=> array(0) { } ["cross_sell_ids"]=> array(0) { } ["parent_id"]=> int(645) ["reviews_allowed"]=> bool(false) ["purchase_note"]=> string(0) "" ["attributes"]=> array(1) { ["pa_size"]=> string(10) "iphone-6-7" } ["default_attributes"]=> array(0) { } ["menu_order"]=> int(0) ["virtual"]=> bool(false) ["downloadable"]=> bool(false) ["category_ids"]=> array(0) { } ["tag_ids"]=> array(0) { } ["shipping_class_id"]=> int(0) ["downloads"]=> array(0) { } ["image_id"]=> string(1) "0" ["gallery_image_ids"]=> array(0) { } ["download_limit"]=> int(-1) ["download_expiry"]=> int(-1) ["rating_counts"]=> array(0) { } ["average_rating"]=> int(0) ["review_count"]=> int(0) } ["supports":protected]=> array(1) { [0]=> string(16) "ajax_add_to_cart" } ["id":protected]=> int(647) ["changes":protected]=> array(0) { } ["object_read":protected]=> bool(true) ["extra_data":protected]=> array(0) { } ["default_data":protected]=> array(48) { ["name"]=> string(0) "" ["slug"]=> string(0) "" ["date_created"]=> NULL ["date_modified"]=> NULL ["status"]=> bool(false) ["featured"]=> bool(false) ["catalog_visibility"]=> string(7) "visible" ["description"]=> string(0) "" ["short_description"]=> string(0) "" ["sku"]=> string(0) "" ["price"]=> string(0) "" ["regular_price"]=> string(0) "" ["sale_price"]=> string(0) "" ["date_on_sale_from"]=> NULL ["date_on_sale_to"]=> NULL ["total_sales"]=> string(1) "0" ["tax_status"]=> string(7) "taxable" ["tax_class"]=> string(0) "" ["manage_stock"]=> bool(false) ["stock_quantity"]=> NULL ["stock_status"]=> string(7) "instock" ["backorders"]=> string(2) "no" ["sold_individually"]=> bool(false) ["weight"]=> string(0) "" ["length"]=> string(0) "" ["width"]=> string(0) "" ["height"]=> string(0) "" ["upsell_ids"]=> array(0) { } ["cross_sell_ids"]=> array(0) { } ["parent_id"]=> int(0) ["reviews_allowed"]=> bool(true) ["purchase_note"]=> string(0) "" ["attributes"]=> array(0) { } ["default_attributes"]=> array(0) { } ["menu_order"]=> int(0) ["virtual"]=> bool(false) ["downloadable"]=> bool(false) ["category_ids"]=> array(0) { } ["tag_ids"]=> array(0) { } ["shipping_class_id"]=> int(0) ["downloads"]=> array(0) { } ["image_id"]=> string(0) "" ["gallery_image_ids"]=> array(0) { } ["download_limit"]=> int(-1) ["download_expiry"]=> int(-1) ["rating_counts"]=> array(0) { } ["average_rating"]=> int(0) ["review_count"]=> int(0) } ["data_store":protected]=> object(WC_Data_Store)#9371 (4) { ["instance":"WC_Data_Store":private]=> object(WC_Product_Variation_Data_Store_CPT)#9374 (5) { ["internal_meta_keys":protected]=> array(87) { [0]=> string(5) "_name" [1]=> string(5) "_slug" [2]=> string(13) "_date_created" [3]=> string(14) "_date_modified" [4]=> string(7) "_status" [5]=> string(9) "_featured" [6]=> string(19) "_catalog_visibility" [7]=> string(12) "_description" [8]=> string(18) "_short_description" [9]=> string(4) "_sku" [10]=> string(6) "_price" [11]=> string(14) "_regular_price" [12]=> string(11) "_sale_price" [13]=> string(18) "_date_on_sale_from" [14]=> string(16) "_date_on_sale_to" [15]=> string(12) "_total_sales" [16]=> string(11) "_tax_status" [17]=> string(10) "_tax_class" [18]=> string(13) "_manage_stock" [19]=> string(15) "_stock_quantity" [20]=> string(13) "_stock_status" [21]=> string(11) "_backorders" [22]=> string(18) "_sold_individually" [23]=> string(7) "_weight" [24]=> string(7) "_length" [25]=> string(6) "_width" [26]=> string(7) "_height" [27]=> string(11) "_upsell_ids" [28]=> string(15) "_cross_sell_ids" [29]=> string(10) "_parent_id" [30]=> string(16) "_reviews_allowed" [31]=> string(14) "_purchase_note" [32]=> string(11) "_attributes" [33]=> string(19) "_default_attributes" [34]=> string(11) "_menu_order" [35]=> string(8) "_virtual" [36]=> string(13) "_downloadable" [37]=> string(13) "_category_ids" [38]=> string(8) "_tag_ids" [39]=> string(18) "_shipping_class_id" [40]=> string(10) "_downloads" [41]=> string(9) "_image_id" [42]=> string(18) "_gallery_image_ids" [43]=> string(15) "_download_limit" [44]=> string(16) "_download_expiry" [45]=> string(14) "_rating_counts" [46]=> string(15) "_average_rating" [47]=> string(13) "_review_count" [48]=> string(11) "_visibility" [49]=> string(4) "_sku" [50]=> string(6) "_price" [51]=> string(14) "_regular_price" [52]=> string(11) "_sale_price" [53]=> string(22) "_sale_price_dates_from" [54]=> string(20) "_sale_price_dates_to" [55]=> string(11) "total_sales" [56]=> string(11) "_tax_status" [57]=> string(10) "_tax_class" [58]=> string(13) "_manage_stock" [59]=> string(6) "_stock" [60]=> string(13) "_stock_status" [61]=> string(11) "_backorders" [62]=> string(18) "_sold_individually" [63]=> string(7) "_weight" [64]=> string(7) "_length" [65]=> string(6) "_width" [66]=> string(7) "_height" [67]=> string(11) "_upsell_ids" [68]=> string(14) "_crosssell_ids" [69]=> string(14) "_purchase_note" [70]=> string(19) "_default_attributes" [71]=> string(19) "_product_attributes" [72]=> string(8) "_virtual" [73]=> string(13) "_downloadable" [74]=> string(9) "_featured" [75]=> string(19) "_downloadable_files" [76]=> string(16) "_wc_rating_count" [77]=> string(18) "_wc_average_rating" [78]=> string(16) "_wc_review_count" [79]=> string(22) "_variation_description" [80]=> string(13) "_thumbnail_id" [81]=> string(11) "_file_paths" [82]=> string(22) "_product_image_gallery" [83]=> string(16) "_product_version" [84]=> string(12) "_wp_old_slug" [85]=> string(10) "_edit_last" [86]=> string(10) "_edit_lock" } ["extra_data_saved":protected]=> bool(false) ["updated_props":protected]=> array(0) { } ["meta_type":protected]=> string(4) "post" ["object_id_field_for_meta":protected]=> string(0) "" } ["stores":"WC_Data_Store":private]=> array(18) { ["coupon"]=> string(24) "WC_Coupon_Data_Store_CPT" ["customer"]=> string(22) "WC_Customer_Data_Store" ["customer-download"]=> string(31) "WC_Customer_Download_Data_Store" ["customer-session"]=> string(30) "WC_Customer_Data_Store_Session" ["order"]=> string(23) "WC_Order_Data_Store_CPT" ["order-refund"]=> string(30) "WC_Order_Refund_Data_Store_CPT" ["order-item"]=> string(24) "WC_Order_Item_Data_Store" ["order-item-coupon"]=> string(31) "WC_Order_Item_Coupon_Data_Store" ["order-item-fee"]=> string(28) "WC_Order_Item_Fee_Data_Store" ["order-item-product"]=> string(32) "WC_Order_Item_Product_Data_Store" ["order-item-shipping"]=> string(33) "WC_Order_Item_Shipping_Data_Store" ["order-item-tax"]=> string(28) "WC_Order_Item_Tax_Data_Store" ["payment-token"]=> string(27) "WC_Payment_Token_Data_Store" ["product"]=> string(25) "WC_Product_Data_Store_CPT" ["product-grouped"]=> string(33) "WC_Product_Grouped_Data_Store_CPT" ["product-variable"]=> string(34) "WC_Product_Variable_Data_Store_CPT" ["product-variation"]=> string(35) "WC_Product_Variation_Data_Store_CPT" ["shipping-zone"]=> string(27) "WC_Shipping_Zone_Data_Store" } ["current_class_name":"WC_Data_Store":private]=> string(35) "WC_Product_Variation_Data_Store_CPT" ["object_type":"WC_Data_Store":private]=> string(17) "product-variation" } ["meta_data":protected]=> array(9) { [0]=> object(stdClass)#9524 (3) { ["id"]=> int(9259) ["key"]=> string(17) "_vc_post_settings" ["value"]=> array(1) { ["vc_grid_id"]=> array(0) { } } } [1]=> object(stdClass)#9523 (3) { ["id"]=> int(9281) ["key"]=> string(13) "_unit_product" ["value"]=> string(0) "" } [2]=> object(stdClass)#9522 (3) { ["id"]=> int(9282) ["key"]=> string(16) "_unit_price_auto" ["value"]=> string(3) "yes" } [3]=> object(stdClass)#9521 (3) { ["id"]=> int(9283) ["key"]=> string(19) "_unit_price_regular" ["value"]=> string(0) "" } [4]=> object(stdClass)#9520 (3) { ["id"]=> int(9284) ["key"]=> string(11) "_unit_price" ["value"]=> string(0) "" } [5]=> object(stdClass)#9519 (3) { ["id"]=> int(9285) ["key"]=> string(16) "_unit_price_sale" ["value"]=> string(0) "" } [6]=> object(stdClass)#9518 (3) { ["id"]=> int(9286) ["key"]=> string(10) "_mini_desc" ["value"]=> string(0) "" } [7]=> object(stdClass)#9517 (3) { ["id"]=> int(9287) ["key"]=> string(14) "_free_shipping" ["value"]=> string(0) "" } [8]=> object(stdClass)#9516 (3) { ["id"]=> int(9288) ["key"]=> string(8) "_service" ["value"]=> string(0) "" } } ["gzd_product"]=> object(WC_GZD_Product)#9376 (3) { ["child":protected]=> *RECURSION* ["gzd_variation_level_meta":protected]=> array(7) { ["unit_price"]=> string(0) "" ["unit_price_regular"]=> string(0) "" ["unit_price_sale"]=> string(0) "" ["unit_price_auto"]=> string(0) "" ["mini_desc"]=> string(0) "" ["service"]=> string(0) "" ["gzd_product"]=> NULL } ["gzd_variation_inherited_meta_data":protected]=> array(6) { [0]=> string(4) "unit" [1]=> string(9) "unit_base" [2]=> string(12) "unit_product" [3]=> string(16) "sale_price_label" [4]=> string(24) "sale_price_regular_label" [5]=> string(13) "free_shipping" } } }
But I dont know what this means…Hey,
cool dass du den Vorschlag implementiert hast, danke 🙂
Allerdings benutze ich den Code aus folgendem Link um die Rechnungs- und Lieferadressfelder neu zu sortieren und dabei verschwindet die Paketshop-Checkbox aus der Lieferadresse :/ Hast du eine Idee wie ich sie wiederbekomme?
https://businessbloomer.com/woocommerce-move-reorder-fields-checkout-page/Forum: Plugins
In reply to: [WooCommerce] Show product excerpt/ short description in cart & checkoutI already tried what you suggested, that removed the error but also did not add the excerpt :/
Hope we can fix it cause I love your plugin 🙂
Hi Walter,
thank you very much for your soon reply. It seems to be a conflict with my theme (“Royal” by 8theme). It contains a file named etheme.js and this file contains the following part of code that causes the conflict:// **********************************************************************// // ! Product variations images // **********************************************************************// $('form.variations_form').on( 'found_variation', function( event, variation ) { var $variation_form = $(this); var $product = $(this).closest( '.product' ); var $product_img = $product.find( '.woocommerce-main-image img:eq(0)' ); var $product_link = $product.find( '.woocommerce-main-image' ); var $lighbox_link = $product.find( '.product-lightbox-btn' ).first(); var o_src = $product_img.attr('data-o_srcset'); var o_title = $product_img.attr('data-o_title'); var o_href = $product_link.attr('data-o_src'); var variation_image = variation.image.src; var variation_link = variation.image.url; var variation_title = variation.image.title; $product_link.attr('href', variation_image); if ($('.main-images').hasClass('zoom-enabled')) { if($(window).width() > 768 && variation_image.length > 5 && variation_link.length > 5){ try { $product_link.swinxyzoom('load', variation_image, variation_link); } catch(e) {} } $product_link.attr('href', variation_link); if(variation_link.length > 5) $('.sxy-zoom-viewport img').first().attr('src', variation_image); if(variation_link.length > 5) $lighbox_link.attr('href', variation_link); } else { $product_link.attr('href', variation_link); if( variation_image.length > 5 ) $( '.woocommerce-main-image img' ).first().attr( 'src', variation_image ); if( variation_image.length > 5 ) $( '.woocommerce-main-image img' ).first().attr( 'srcset', variation_image ); } var owlMain = jQuery(".main-images").data('owlCarousel'); if( typeof owlMain != 'undefined') { owlMain.goTo(0); } })I already contacte the theme authors to check the code for bugs but got no response yet. Their support is not that good when it comes to such specific questions, so I hope that maybe you can see the bug?
Many thanks in advance!