|
|
|
@ -4,7 +4,6 @@ import { connect } from "react-redux"; |
|
|
|
|
import separate from "../../utils/separate"; |
|
|
|
|
import StarRating from "../StarRating"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import book from "./goldon.png"; |
|
|
|
|
import heart from "./vuesax-linear-heart.svg"; |
|
|
|
|
import discountImg from "./discount.png"; |
|
|
|
@ -29,7 +28,7 @@ const ProductDesign = ({ |
|
|
|
|
hoverMode, |
|
|
|
|
starRate, |
|
|
|
|
imageSize, |
|
|
|
|
type |
|
|
|
|
type, |
|
|
|
|
}) => { |
|
|
|
|
const [isHovering, setIsHovering] = useState(false); |
|
|
|
|
return ( |
|
|
|
@ -93,8 +92,9 @@ const ProductDesign = ({ |
|
|
|
|
<p |
|
|
|
|
className={`text-justify mt-2 text-xs leading-6 ${productExcerptTextColor}`} |
|
|
|
|
> |
|
|
|
|
این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های خوب |
|
|
|
|
دیگری نیز دارد. |
|
|
|
|
{window.t( |
|
|
|
|
"این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های خوب دیگری نیز دارد." |
|
|
|
|
)} |
|
|
|
|
</p> |
|
|
|
|
)} |
|
|
|
|
{productCat && ( |
|
|
|
@ -123,18 +123,19 @@ const ProductDesign = ({ |
|
|
|
|
> |
|
|
|
|
{writeGHEIMAT && ( |
|
|
|
|
<span className="text-xs text-borderColor ml-2"> |
|
|
|
|
قیمت |
|
|
|
|
{window.t("قیمت")} |
|
|
|
|
</span> |
|
|
|
|
)} |
|
|
|
|
{/* price with line on it */} |
|
|
|
|
{discountPrice && ( |
|
|
|
|
<p className="line-through text-xs text-borderColor mr-2"> |
|
|
|
|
145<span>تومان</span> |
|
|
|
|
145<span>{window.t("تومان")}</span> |
|
|
|
|
</p> |
|
|
|
|
)} |
|
|
|
|
</div> |
|
|
|
|
<p className="text-lg text-productPrice font-semibold inline text-green4F"> |
|
|
|
|
{separate(product.product[type]?.price)} <span>تومان</span> |
|
|
|
|
{separate(product.product[type]?.price)}{" "} |
|
|
|
|
<span>{window.t("تومان")}</span> |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
{/* add to cart */} |
|
|
|
@ -144,7 +145,7 @@ const ProductDesign = ({ |
|
|
|
|
priceDirection.indexOf("col") !== -1 ? "w-full" : "" |
|
|
|
|
}`}
|
|
|
|
|
> |
|
|
|
|
اضافه کردن به سبد خرید |
|
|
|
|
{window.t("اضافه کردن به سبد خرید")} |
|
|
|
|
</button> |
|
|
|
|
)} |
|
|
|
|
</div> |
|
|
|
@ -157,7 +158,7 @@ const ProductDesign = ({ |
|
|
|
|
isHovering ? "" : "hidden" |
|
|
|
|
}`}
|
|
|
|
|
> |
|
|
|
|
<button>افزودن به سبد خرید</button> |
|
|
|
|
<button>{window.t("افزودن به سبد خرید")}</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
) : null} |
|
|
|
@ -191,7 +192,7 @@ export default connect(mapStateToProps)(ProductDesign); |
|
|
|
|
|
|
|
|
|
ProductDesign.defaultProps = { |
|
|
|
|
// icons on product image
|
|
|
|
|
type : 0, |
|
|
|
|
type: 0, |
|
|
|
|
colors: false, |
|
|
|
|
likeBtn: false, |
|
|
|
|
discount: false, |
|
|
|
|