Andrei | wip: refacting module shop

web_10
parent d6ae2ec32f
commit f062cbf11f
  1. 1
      wp-content/themes/cosmopet/modules/shop/CosmopetProduct.php
  2. 4
      wp-content/themes/cosmopet/woocommerce.php

@ -985,6 +985,7 @@ class CosmopetProduct extends TimberProduct {
return $attributes; return $attributes;
} }
// TO_DO: переименовать в getPriceWithCurrency
public function getPrice(){ public function getPrice(){
$price = $this->product->get_price() . ' ' . get_woocommerce_currency_symbol(); $price = $this->product->get_price() . ' ' . get_woocommerce_currency_symbol();
return $price; return $price;

@ -37,9 +37,9 @@ if (is_product()) {
} }
if ($use_new_template) { if ($use_new_template) {
include_component('shop', 'product-single--new'); include_component('shop', 'product-single--new'); // выводим новый шаблон с калькулятором для кормов и лакомств
} else { } else {
include_component('shop', 'product-single'); include_component('shop', 'product-single'); // выводим старый шаблон подробной версии товара для аксессуаров
} }
} elseif (is_shop()) { } elseif (is_shop()) {
include_component('shop', 'catalog'); include_component('shop', 'catalog');

Loading…
Cancel
Save