{"id":6399,"date":"2021-10-21T14:37:00","date_gmt":"2021-10-21T14:37:00","guid":{"rendered":"https:\/\/musilda.cz\/?p=6399"},"modified":"2021-10-21T14:37:00","modified_gmt":"2021-10-21T14:37:00","slug":"jak-presunout-ikonu-pro-odebrani-z-kosiku-na-konec-tabulky-v-kosiku","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-presunout-ikonu-pro-odebrani-z-kosiku-na-konec-tabulky-v-kosiku\/","title":{"rendered":"Jak p\u0159esunout ikonu pro odebr\u00e1n\u00ed z ko\u0161\u00edku na konec tabulky v ko\u0161\u00edku"},"content":{"rendered":"\n
Netu\u0161\u00edm pro\u010d, ale kdy\u017e dostanu grafick\u00fd n\u00e1vrh e-shopu, tak na str\u00e1nce ko\u0161\u00edku, je ikona pro odebr\u00e1n\u00ed z ko\u0161\u00edku v tabulce a\u017e na posledn\u00edm m\u00edst\u011b. Mus\u00edm se zeptat ve skupin\u011b grafik\u016f na Facebooku, jestli nejsou n\u011bjak domluven\u00ed.<\/p>\n\n\n\n
V ka\u017ed\u00e9m p\u0159\u00edpad\u011b p\u0159esun nen\u00ed moc slo\u017eit\u00fd, jedn\u00e1 se o jednoduchou \u00fapravu html tabulky.<\/p>\n\n\n\n
Prvn\u00ed co mus\u00edme ud\u011blat, je zkop\u00edrovat soubor cart.php, kter\u00fd najdete v wp-content\/plugins\/woocomerce\/templates\/cart a zkop\u00edrovat jej do slo\u017eky themes\/vase-sablona\/woocomerce\/cart. <\/p>\n\n\n\n
P\u0159edpokl\u00e1d\u00e1m, \u017ee tam ten soubor je\u0161t\u011b nem\u00e1te, pokud ano, jen jej otev\u0159ete a m\u016f\u017eete upravovat. <\/p>\n\n\n\n
V n\u011bm najdete k\u00f3d:<\/p>\n\n\n\n
<tr>\n\t<th class=\"product-remove\"> <\/th>\n\t<th class=\"product-thumbnail\"> <\/th>\n\t<th class=\"product-name\"><?php esc_html_e( 'Product', 'woocommerce' ); ?><\/th>\n\t<th class=\"product-price\"><?php esc_html_e( 'Price', 'woocommerce' ); ?><\/th>\n\t<th class=\"product-quantity\"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?><\/th>\n\t<th class=\"product-subtotal\"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?><\/th>\n<\/tr><\/code><\/pre>\n\n\n\na ten uprav\u00edte na:<\/p>\n\n\n\n
<tr>\n\t<th class=\"product-thumbnail\"> <\/th>\n\t<th class=\"product-name\"><?php esc_html_e( 'Product', 'woocommerce' ); ?><\/th>\n\t<th class=\"product-price\"><?php esc_html_e( 'Price', 'woocommerce' ); ?><\/th>\n\t<th class=\"product-quantity\"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?><\/th>\n\t<th class=\"product-subtotal\"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?><\/th>\n <th class=\"product-remove\"> <\/th>\n<\/tr><\/code><\/pre>\n\n\n\nPak vezmete k\u00f3d:<\/p>\n\n\n\n
<tr class=\"woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>\">\n\n\t<td class=\"product-remove\">\n\t<?php\n\techo apply_filters( \/\/ phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t'woocommerce_cart_item_remove_link',\n\t\tsprintf(\n\t\t\t'<a href=\"%s\" class=\"remove\" aria-label=\"%s\" data-product_id=\"%s\" data-product_sku=\"%s\">×<\/a>',\n\t\t\tesc_url( wc_get_cart_remove_url( $cart_item_key ) ),\n\t\t\tesc_html__( 'Remove this item', 'woocommerce' ),\n\t\t\tesc_attr( $product_id ),\n\t\t\tesc_attr( $_product->get_sku() )\n\t\t),\n\t\t$cart_item_key\n\t);\n\t?>\n\t<\/td>\n\n\t<td class=\"product-thumbnail\">\n\n...........\n\n\t<td class=\"product-subtotal\" data-title=\"<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>\">\n\t<?php\n\t\techo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); \/\/ PHPCS: XSS ok.\n\t?>\n\t<\/td>\n<\/tr><\/code><\/pre>\n\n\n\nna:<\/p>\n\n\n\n
<tr class=\"woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>\">\n\n\t<td class=\"product-thumbnail\">\n\n...........\n\n\t<td class=\"product-subtotal\" data-title=\"<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>\">\n\t<?php\n\t\techo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); \/\/ PHPCS: XSS ok.\n\t?>\n\t<\/td>\n\n <td class=\"product-remove\">\n\t<?php\n\techo apply_filters( \/\/ phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t'woocommerce_cart_item_remove_link',\n\t\tsprintf(\n\t\t\t'<a href=\"%s\" class=\"remove\" aria-label=\"%s\" data-product_id=\"%s\" data-product_sku=\"%s\">×<\/a>',\n\t\t\tesc_url( wc_get_cart_remove_url( $cart_item_key ) ),\n\t\t\tesc_html__( 'Remove this item', 'woocommerce' ),\n\t\t\tesc_attr( $product_id ),\n\t\t\tesc_attr( $_product->get_sku() )\n\t\t),\n\t\t$cart_item_key\n\t);\n\t?>\n\t<\/td>\n\n<\/tr><\/code><\/pre>\n\n\n\n