Hi! I have last VM version on J4.1.5.
I have an item that costs 500 euro and want to sell it at 200 euro.
Why it is not possible to do this? I just would like to strike the 500 Euros and to have 200 in green...
If you look at the image it makes a nonsense...
Moreover in the prices configuration in products I have not "Override" possibility.
What's wrong?
Thank you for your help!
Of course You can. 8)
Create a discount Rule for 300 euro, there You can set start and stop date and create other connections. Price override doesn´t do this.
Jörgen @ Kreativ Fotografi
Alternatively in Configuration/Pricing/ Price Configuration
Select Show expert pricing options - Yes. Then the price override function will appear for products.
Thank you!! It works!
One more question.
My customer sells paintings. They are mostly vertical but in the preview it stretches the image and that's not good.
Is there a way not the program to do this?
I attach an image to show what i mean.
Thank you in advance!
For the stretching, it's a CSS problem.
I think
max-width:100%;
for the product image should work
I cannot verify, because you do not provide link to the shop.
Thank you. Here it is: http://atena.sviluppo.host/index.php/it/shop/giovanfrancesco-gonzaga
no idea where the css is coming from ..your css is combined by the T3 framework but to correct
.productdetails-view .vm-product-media-container .main-image a img {
max-height: 360px;
width: auto;
}
Oh, cool.
Can I ask you where to add it?
Thank you, I am not so "in" with css, unfortunately :(
as I say-> "no idea where the css is coming from ..your css is combined by the T3 framework but to correct"
you add it where it works... there must be somewhere in these awful frameworks for custom css
put
width: auto !important;
as a last resort
Ok thank you, it works.
Just had to create /templates/ja_elicyon/css/custom.css.
I was in doubt since the file didn't exist.
Thank you!
The file did not exist because it is your responsibility to create it. :)
If you understand the T3 framework and the Elycion template, it's in the documentation on how to work with custom code.
Otherwise, there is no need to put in cusom.less, but there is a file com_virtuemart.less in the extra folder where you can edit it straight away and you don't need to set the !important flag - that's just a last ditch brake and I'm breaking our coders' hands for that kind of work.
Again - it's all in the documentation or just a simple click through the folders after installation and look at the template settings
And there is also paid support - where they will be happy to help you, because elycion is a paid template and then you are entitled to a support ticket.
Quote from: pinochico on July 19, 2022, 20:05:52 PM
And there is also paid support - where they will be happy to help you, because elycion is a paid template and then you are entitled to a support ticket.
About this i wont' share private messages but I asked I think 3 times them to pay for support but no answers at all.
The guy that realizes themes is very helpful but it answers just once per day and not all days...
I want to repeat, he is very kind and he has been very kind but he answers with a big delay and he seems not interested in paid support.
Maybe I asked in the wrong way and it is my fault...
Anyway i will try again :)
Back to the main subject, how do I avoid things like these?
First item base price 1200 and discount to 850.
Secondo item only base price 400 but i have in any case the discount price to 400...
How do I avoid publishing the sell price if there is no discount?
Thank you
Uncheck the price override.
Or modify the discount display code in Your template.
if (abs(base prise -new price) <= diff) then do not show base price
This code should be in your template files. Modify in terms of above
Jörgen
Price override is not checked.
I have this as below.
Check your code in the template for updating prices in the view.
There is a check if discount price is equal to base price. You have to check with diff. Not ==, rounding errors makes this impossible with float.
Jörgen
Is it in /public_html/templates/ja_elicyon/html/com_virtuemart/productdetails/default.php?
no
sublayout price
This is the code I have:
defined ('_JEXEC') or die('Restricted access');
$product = $viewData['product'];
$currency = $viewData['currency'];
?>
<div class="product-price <?php echo (empty($product->prices['salesPrice']) ? '':'salesprice') ?>" id="productPrice<?php echo $product->virtuemart_product_id ?>">
<?php
if (!empty($product->prices['salesPrice'])) {
//echo '<div class="vm-cart-price">' . vmText::_ ('COM_VIRTUEMART_CART_PRICE') . '</div>';
}
if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and isset($product->images[0]) and !$product->images[0]->file_is_downloadable) {
$askquestion_url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id . '&tmpl=component', FALSE);
?>
<a class="ask-a-question bold" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
<?php
} else {
//if ($showBasePrice) {
echo $currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices);
//if (round($product->prices['basePrice'],$currency->_priceConfig['basePriceVariant'][1]) != $product->prices['basePriceVariant']) {
echo $currency->createPriceDiv ('basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $product->prices);
//}
//}
echo $currency->createPriceDiv ('variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $product->prices);
if (round($product->prices['basePriceWithTax'],$currency->_priceConfig['salesPrice'][1]) != round($product->prices['salesPrice'],$currency->_priceConfig['salesPrice'][1])) {
echo '<span class="price-crossed" >' . $currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices) . "</span>";
}
if (round($product->prices['salesPriceWithDiscount'],$currency->_priceConfig['salesPrice'][1]) != round($product->prices['salesPrice'],$currency->_priceConfig['salesPrice'][1])) {
echo $currency->createPriceDiv ('salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $product->prices);
}
echo $currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
if ($product->prices['discountedPriceWithoutTax'] != $product->prices['priceWithoutTax']) {
echo $currency->createPriceDiv ('discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $product->prices);
} else {
echo $currency->createPriceDiv ('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $product->prices);
}
echo $currency->createPriceDiv ('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $product->prices);
echo $currency->createPriceDiv ('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $product->prices);
$unitPriceDescription = vmText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE', vmText::_('COM_VIRTUEMART_UNIT_SYMBOL_'.$product->product_unit));
echo $currency->createPriceDiv ('unitPrice', $unitPriceDescription, $product->prices);
}
?>
</div>
Prices.php cotains the logic that shows the correct price in the orrect moment and in the correct place. Customize as you like, but make a template override first for this file or else your changes will soon be lost.
Check these lines:
if (round($product->prices['basePriceWithTax'],$currency->_priceConfig['salesPrice'][1]) != round($product->prices['salesPrice'],$currency->_priceConfig['salesPrice'][1])) {
if (round($product->prices['salesPriceWithDiscount'],$currency->_priceConfig['salesPrice'][1]) != round($product->prices['salesPrice'],$currency->_priceConfig['salesPrice'][1])) {
if ($product->prices['discountedPriceWithoutTax'] != $product->prices['priceWithoutTax']) {
I guess the last line is the one that makes trouble.
Jörgen
I was trying to modify as followign but with bad results:
if ($product->prices['discountedPriceWithoutTax'] != $product->prices['priceWithoutTax']) {
echo $currency->createPriceDiv ('discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $product->prices);
}
if ($product->prices['discountedPriceWithoutTax'] == $product->prices['priceWithoutTax']) {
echo $this->currency->createPriceDiv ( 'basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices );
}
Where do I wrong?