Trouble with tax/discount price

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Jul 01, 2013 2:14 pm
Reply with quote
Report this post
Hi,
I'm in trouble with the product prices. When apply to the price the 21% tax included prices shows up. When not price is not showing up. In example, here the 21%tax incl is not set and price is not displaying:

Image

If I apply the 21%tax rule to the product the pice displays correctly:

Image

but I don't want a tax for this product, but only a discount. I created a new rule,its a -50% discount and when I apply it the price is not displaying.

When go into the product details page, the price is applied with the discount, but theres no overlined text at all.

What can i do?

Kind regards,
User avatar
Gold Boarder

teitbite
Mon Jul 01, 2013 5:51 pm
Reply with quote
Report this post
Hi

We have modified this module a lot, so this may not be working right because of it. Tell me exactly which product has a discount and which not, so I'll know where to work. Is FTP access I got still working?
User avatar
Moderator

GK User
Mon Jul 01, 2013 6:42 pm
Reply with quote
Report this post
Hi Teitbite,
yes the ftp details are the same, you are free to test it.
I know we have modified this category/page a lot, but we need this feature (discount) to be displayed. The old price should be overlined and display the new price, am I right?

This product http://tiendanueva.negre.es/entrega-rap ... anco-.html
has the discount applied (- 50%), it is visible on product details as a normal price and is not displayed in category page:
http://tiendanueva.negre.es/entrega-rapida.html

The other products in the shop are without discount and with 21% tax applied.
The conflict starts when 21% tax is not set in admin.
What can we do?
In the override.css some classes were set to display:none; to hide some elements, but I activated them again, but the changes keep the same, discount price is not displayed.

Please help me with this important feature that is indispensable to our shop.
Please let me know,

Kind regards,
User avatar
Gold Boarder

GK User
Tue Jul 02, 2013 9:16 am
Reply with quote
Report this post
The discount price is applied now to the price:
http://tiendanueva.negre.es/entrega-rapida.html (product four), http://tiendanueva.negre.es/entrega-rap ... anco-.html (product page details).
Is there any way to display the normal price overlined next to the discounted price in both category page and product details page?
I see other virtuemart sites have this.
Please let me know,

Thanks in advance,
Kind Regards,
User avatar
Gold Boarder

GK User
Wed Jul 03, 2013 9:04 am
Reply with quote
Report this post
Hi,
I need it to be fixed. I don't know why the old price (without discount) doesn't appear in product category and product details. I know in other virtuemart pages it appears. Why not here?
How can we solve it?
Please let me know,
Thanks,

Kind Regards,
User avatar
Gold Boarder

teitbite
Wed Jul 03, 2013 12:01 pm
Reply with quote
Report this post
Hi

Please do not bump Your own thread. I could not get to it, because it is still moving to the end of the line. And I have Your ftp open and was only looking for this thread :) I'm on it now. Will let You know in couple of minutes.
User avatar
Moderator

teitbite
Wed Jul 03, 2013 12:47 pm
Reply with quote
Report this post
Hi

I'm working with category layout right now. I was trying to use the default view, but such functionality is not implemented there at all :) Also this will be a very specific modification, becauase Your discount is not global but attached to a product variant (whatever this means, I'm not VM expert).

I'm working with file /html/com_virtuemart/category/default.php lines around 250:

Code: Select all
if ($this->show_prices == '1') {
if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and  !$product->images[0]->file_is_downloadable) {
echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
}                  
echo $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices);
echo $this->currency->createPriceDiv('taxAmount','TPL_GK_LANG_VM_INC_TAX', $product->prices);
} ?>


I've been trying hard, but it's just configured in a wrong way. The discount is set as tax, so I have no way to use it in code. So first You need to attach a discount properly, unfortunately I do not know how to do that, You need to ask VM support for that.

Right now, Your discount is hidden in an array:

Code: Select all
 ["Tax"]=>
  array(1) {
    [5]=>
    array(8) {
      [0]=>
      string(13) "descuento 50%"
      [1]=>
      string(7) "50.0000"
      [2]=>
      string(2) "-%"


so it's not usable in a way we need it.
User avatar
Moderator

GK User
Wed Jul 03, 2013 5:45 pm
Reply with quote
Report this post
Hi,
thanks for the support and the effort!
Is not possible to display the discounted price? I'll ask in virtuemart if they know how to do it.
I know Norman modified me the layout to display the tax, but I also need to display the discount next to the price... I saw lots of sites with it.

Let me know if any of you knows a solution for it.
Thanks.

Kind Regards,
User avatar
Gold Boarder

teitbite
Fri Jul 05, 2013 11:31 pm
Reply with quote
Report this post
Hi

I'm sure it's possible, but the way discount is applied now means that the only way to make it is by writing a script which will count it when product is shown. I think there must be a way it's done in VM, unfortunately I'm not VM expert so I cannot tell how to configure discount to achieve that. Right now it looks like that:

- I have price, price with tax
- discount is displayed as a variant of tax, but VM is not providing a price modified by this discount
User avatar
Moderator

GK User
Thu Jul 11, 2013 11:09 am
Reply with quote
Report this post
Hi Teitbite,
thanks for the reply. I am still a bit confused about it and I need to display the discounted price too!
Do you suggest to ask this issue in Virtuemart official forum?
I think we've replaced the tax with the discount price...
not very sure about it, but there's a code changed or that's left.

If you know anything more about this (you or gavick team), please let me know,
Kind Regards,
User avatar
Gold Boarder

teitbite
Sun Jul 14, 2013 3:11 am
Reply with quote
Report this post
Hi

Yes. I understand You 100%. We've made so many changes to this that I'm lost as well. I'm not a VM expert, so I'm learing in the run. But this particular question is all about showing a price which is reduced by an amount applied to tax, not discount. I think it's some kind of a mistake, because VM is preparing a list of available prices, like "basePriceWithTax", "taxAmount", etc. and the one You are asking for is not there. I do not know if it's becuase of the fact that there is another tax applied already or is this discount in wrong place or if it's not prepared at all. Anyway it's making a very hard access to this information from VM code, so it will be better to ask on VM forum first. If they will not help I'll prepare a script and will count it for You somehow, but it will not be easy and we may need to do an-reversible changes.
User avatar
Moderator


cron