Author Topic: Problem with customfields after update 2.6.0a  (Read 2079 times)

Simuel

  • Beginner
  • *
  • Posts: 9
Problem with customfields after update 2.6.0a
« on: May 11, 2014, 11:23:42 am »
Hello people,
i have 2 problems with site after update 2.6.0a.

1st - i use this solution to seeing custom field in category page: http://forum.virtuemart.net/index.php?topic=90961.msg398209#msg398209 and it works for me. But after update only some items have customfields (i have custom fields in every item).

2nd - problem with base price - in every item i have crossed price, and crossed price is the same as base Price With Tax see image

Can you help me fix this? Thank you and sorry for my english.


AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3025
  • VirtueMart Version: 3.6.3
Re: Problem with customfields after update 2.6.0a
« Reply #1 on: May 11, 2014, 12:15:35 pm »
Did you re-do your override for the category page

It may be that something has changed in the ad to cart code that is not catered for in  your category add to cart override?

Sometimes overrides need to cater for base coding changes .
regards
A

Joomla 3.9.12
php 7.2

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9228
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Problem with customfields after update 2.6.0a
« Reply #2 on: May 11, 2014, 12:21:56 pm »
crossed prices is just css - without a live url can't help further
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Simuel

  • Beginner
  • *
  • Posts: 9
Re: Problem with customfields after update 2.6.0a
« Reply #3 on: May 11, 2014, 16:37:52 pm »
Did you re-do your override for the category page

It may be that something has changed in the ad to cart code that is not catered for in  your category add to cart override?

Sometimes overrides need to cater for base coding changes .

I mean not, after update i use the new default_addtocart - and the custom field is correct for some items.

Simuel

  • Beginner
  • *
  • Posts: 9
Re: Problem with customfields after update 2.6.0a
« Reply #4 on: May 11, 2014, 16:39:40 pm »

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9228
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Problem with customfields after update 2.6.0a
« Reply #5 on: May 11, 2014, 17:28:45 pm »
crossed prices - I really don't know what your asking

your displaying the  PricebasePriceWithTax

and your css clearly states

#povodna-cena-s-dph .PricebasePriceWithTax {
  color: #FF6666;
  font-size: 11px;
  margin: 0 8px;
  text-decoration: line-through;
}
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Simuel

  • Beginner
  • *
  • Posts: 9
Re: Problem with customfields after update 2.6.0a
« Reply #6 on: May 11, 2014, 17:39:57 pm »
crossed prices - I really don't know what your asking

your displaying the  PricebasePriceWithTax

and your css clearly states

#povodna-cena-s-dph .PricebasePriceWithTax {
  color: #FF6666;
  font-size: 11px;
  margin: 0 8px;
  text-decoration: line-through;
}

I mean that i have one crossed base price and one base price with tax - but i havent set sale. I set only product price, a this two prices is showing. You know?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9228
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Problem with customfields after update 2.6.0a
« Reply #7 on: May 11, 2014, 18:00:56 pm »
switch off the base price with tax display in the VM price display admin

if that doesn't work then it is your template - if it's 3rd party you have to ask the developer
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Simuel

  • Beginner
  • *
  • Posts: 9
Re: Problem with customfields after update 2.6.0a
« Reply #8 on: May 11, 2014, 18:08:43 pm »
switch off the base price with tax display in the VM price display admin

if that doesn't work then it is your template - if it's 3rd party you have to ask the developer
If i do that (switch off) then it is OK. But sometime I wont show "old price","new price" and discount. And if I switch off this base price I can't show old price.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9228
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Problem with customfields after update 2.6.0a
« Reply #9 on: May 11, 2014, 18:46:44 pm »
Hmmm - this doesn't appear to be working (clean 2.6.0a)
 the code in components/com_virtuemart/views/productdetails/tmpl/default_showprices.php

there is code there to show 'basePriceWithTax' crossed out if the sale price is not equal to it

Code: [Select]
if (round($this->product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "</span>";
}

but the price array node 'basePriceWithTax'  is empty if there is no tax applied so the original price never shows

    [costPrice] => 24.98000
    [basePrice] => 24.98
    [basePriceVariant] => 24.98
    [basePriceWithTax] => 0
    [discountedPriceWithoutTax] => 22.98
    [priceBeforeTax] => 24.98
    [salesPrice] => 22.98
    [taxAmount] => 0
    [salesPriceWithDiscount] => 22.98
    [salesPriceTemp] => 22.98
    [unitPrice] => 0
    [discountAmount] => -2
    [priceWithoutTax] => 24.98

for the price setting in the screen shot

but basePriceWithTax is empty

if I add a tax then basePriceWithTax is there so the logic works and the pre-discount price shows

without any tax if I change the code to

Code: [Select]
if (round($this->product->prices['priceBeforeTax'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('priceBeforeTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices) . "</span>";
}

If no discount then only the end price shows

but this will depend on your particular pricing - you need to experiment


 have to admit the logic of the code in components/com_virtuemart/views/productdetails/tmpl/default_showprices.php  seems sorely lacking in logic

[attachment cleanup by admin]
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Problem with customfields after update 2.6.0a
« Reply #10 on: May 11, 2014, 21:36:55 pm »
Do you have a fix for us? :-)
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9228
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Problem with customfields after update 2.6.0a
« Reply #11 on: May 11, 2014, 22:11:45 pm »
Will code something tomorrow - guess there is just a case missing - discount without tax
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9228
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Code to fix non display of "crossed out" price when no tax is applied to the product  vm2.6.0a

components/com_virtuemart/views/productdetails/tmpl/default_showprices.php
~ line 42

replace
Code: [Select]
if (round($this->product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "</span>";
}

with

Code: [Select]
//discount display start
if($this->product->prices['taxAmount'] > 0 ){
if (round($this->product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "</span>";
}
}else{
if (round($this->product->prices['basePrice'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices) . "</span>";
}
}
//discount display end

price display settings in screen shot

checked with no discounts and/or no tax - just retail price displays


[attachment cleanup by admin]
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9228
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
continued screens

[attachment cleanup by admin]
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Simuel

  • Beginner
  • *
  • Posts: 9
Re: Problem with customfields after update 2.6.0a
« Reply #14 on: May 13, 2014, 11:51:42 am »
Hello people,
i have 2 problems with site after update 2.6.0a.

1st - i use this solution to seeing custom field in category page: http://forum.virtuemart.net/index.php?topic=90961.msg398209#msg398209 and it works for me. But after update only some items have customfields (i have custom fields in every item).

2nd - problem with base price - in every item i have crossed price, and crossed price is the same as base Price With Tax see image

Can you help me fix this? Thank you and sorry for my english.


In 1st question - now I see that if is item 2 days old the custom field is not show, but if is item new the custom field is show. Where can i fix it?