Author Topic: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113  (Read 662 times)

giriga

  • Jr. Member
  • **
  • Posts: 113
  • A beginner
aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« on: August 30, 2019, 17:13:08 pm »
Hi, I updated my virtuemart from 3.4.2 to VirtueMart 3.6.0 10113 I have Joomla 3.9.11 I have a problem with my cart here are the images:

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9037
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #1 on: August 30, 2019, 19:55:09 pm »
enable JOOMLA debug so you can see where the sql is being formed

also you can see the actual query if u do this: 

Report db query error with query
Add the actual query to the error
\libraries\joomla\database\driver\mysqli.php ~ line 650

add this line after  $this->errorMsg = $this->getErrorMessage();

$this->errorMsg = $this->errorMsg.' - '.$query;
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

giriga

  • Jr. Member
  • **
  • Posts: 113
  • A beginner
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #2 on: August 31, 2019, 10:19:31 am »
here is the debug look at image

giriga

  • Jr. Member
  • **
  • Posts: 113
  • A beginner
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #3 on: August 31, 2019, 10:28:22 am »
I added string as you say, now this happens (see image)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9037
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #4 on: August 31, 2019, 11:14:27 am »
you have a syntax error

as the message says -- probably the $ missing

the query is coming from the states model

                  //Test if virtuemart_state_id fits to virtuemart_country_id
                  $q = 'SELECT * FROM `#__virtuemart_states` WHERE `virtuemart_country_id`= "'.$countryId.'" AND `virtuemart_state_id`="'.$stateId.'" and `published`="1"';

you need to see what $q is - add directly after line 127  administrator\components\com_virtuemart\models\state.php

print 'Debug Line '.__LINE__.' $q <pre>'; print_r ($q); print "</pre><br />\n"; die();

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

giriga

  • Jr. Member
  • **
  • Posts: 113
  • A beginner
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #5 on: August 31, 2019, 12:44:33 pm »
sorry I'm not very practical, can you send the correct files?
I tried to add your code, but it didn't solve the problem (see image)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9037
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #6 on: August 31, 2019, 15:06:12 pm »
Its not supposed to solve anything .. it is to give u information to find what is wrong

again your syntax is completely wrong -- please google some basic php skills

if(!isset($c[$h])){
                  //Test if virtuemart_state_id fits to virtuemart_country_id
                  $q = 'SELECT * FROM `#__virtuemart_states` WHERE `virtuemart_country_id`= "'.$countryId.'" AND `virtuemart_state_id`="'.$stateId.'" and `published`="1"';
         print 'Debug Line '.__LINE__.' $q <pre>'; print_r ($q); print "</pre><br />\n"; die();         
                  $db->setQuery($q);
                  $c[$h] = $db->loadResult();
               }
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

giriga

  • Jr. Member
  • **
  • Posts: 113
  • A beginner
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #7 on: August 31, 2019, 16:06:42 pm »
hi, look at the picture, it doesn't work

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9037
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #8 on: August 31, 2019, 16:54:17 pm »
It exactly works -- it shows the query ...

ah -- I think $db isn't set

do this

if(!empty($stateId)){
               $h = $countryId.'.'.$stateId;
               if(!isset($c[$h])){
               // GJC add this
                  $db = JFactory::getDBO();
               //GJC add this
                  //Test if virtuemart_state_id fits to virtuemart_country_id
                  $q = 'SELECT * FROM `#__virtuemart_states` WHERE `virtuemart_country_id`= "'.$countryId.'" AND `virtuemart_state_id`="'.$stateId.'" and `published`="1"';
         //print 'Debug Line '.__LINE__.' $q <pre>'; print_r ($q); print "</pre><br />\n"; die();         
                  $db->setQuery($q);
                  $c[$h] = $db->loadResult();
               }
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

giriga

  • Jr. Member
  • **
  • Posts: 113
  • A beginner
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #9 on: August 31, 2019, 17:08:58 pm »
Hi, this is the result look image

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9037
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #10 on: August 31, 2019, 18:19:00 pm »
then your still writing it wrong.. that is a simple syntax error.. chk your code
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

giriga

  • Jr. Member
  • **
  • Posts: 113
  • A beginner
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #11 on: August 31, 2019, 19:42:58 pm »
Write you, thanks, here's the file

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9037
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #12 on: August 31, 2019, 20:24:47 pm »
try this
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

giriga

  • Jr. Member
  • **
  • Posts: 113
  • A beginner
Re: aggiornamento da 3.4.2 a VirtueMart 3.6.0 10113
« Reply #13 on: September 01, 2019, 10:44:14 am »
Hi, thank you very much! solved problem  ;D

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9918
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/