Review order table This template can be overridden by copying it to yourtheme/woocommerce/checkout/review-order.php. HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer) will need to copy the new files to your theme to maintain compatibility. We try to do this as little as possible, but it does happen. When this occurs the version of the template file will be bumped and the readme will list any important changes.
Review order table Ce modèle peut être remplacé en le copiant dans yourtheme/woocommerce/checkout/review-order.php. CEPENDANT, il arrive que WooCommerce doive mettre à jour les fichiers du modèle et que vous (le développeur du thème) deviez copier les nouveaux fichiers dans votre thème pour maintenir la compatibilité. Nous essayons de le faire le moins possible, mais cela arrive. Lorsque cela se produit, la version du fichier de template sera augmentée et le readme listera les changements importants.
$_product->get_name(
Sortie :
// Nom produit personnalisé dans panier
add_filter('woocommerce_cart_item_name', 'nom_produit_panier_personnalise', 10, 3);
function nom_produit_panier_personnalise($name, $cart_item, $cart_item_key) {
$product = $cart_item['data'];
// Ajouter le SKU au nom
if ($product->get_sku()) {
$name .= ' (' . $product->get_sku() . ')';
}
// Ajouter un badge si en promo
if ($product->is_on_sale()) {
$name .= ' PROMO';
}
return $name;
}
Chargement des actualités...