getParameter() - OXID 6.0

oxid6

#1

When I am trying to update module to OXID 6.0, I am getting this error:
OxidEsales\Eshop\Core\Config::getParameter();

I read the documentations for OXID 6.0 but I cannot find explained replacement for getParameter() method as is explained for oxDb::getDb();

Thank you


#2

You have to use getRequestParameter() :wink:


#3

Thank you for the suggestion, it really worked for me.

So, to not open new Topic, I want to ask you about the replacement for:
‘currency’ => oxConfig::getInstance()->getActShopCurrencyObject()->sign .

What to use in version 6 and where I can find full documentation with all changed classes and methods?

Thank you.


#4

#5

Thanks a lot,

Did someone know what is replacement for “getOne()” in OXID6?

I am receiving following error:
OxidEsales\EshopCommunity\Core\Database\Adapter\Doctrine\Database->getOne(‘SELECT COUNT(*)…’)


#6

wrong topic …

you can use getone() with oxid 6. whats the whole exception?

information about oxid 6 and database:
https://docs.oxid-esales.com/developer/en/6.0/modules/using_database.html


#7

Whole exception:

[exception] [stacktrace] #1 /var/www/html/OXID6/oxideshop_ce/source/modules/ebox_adminstatistics/core/ebox_dashboardcore.php(620): OxidEsales\EshopCommunity\Core\Database\Adapter\Doctrine\Database->getOne(‘SELECT COUNT(*)…’)


#8

really? :wink: sql statement ist working without oxid?


#9

It’s okay, I fixed it.

Thanks for helping!


#10

what was the problem?


#11

It should be:

$sql = “SELECT * from TABLE”;
$variable = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($sql);

Correct me if I am wrong.


#12

no * … example:

\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne("select sum(oxsort) from oxcategory2attribute where oxobjectid='_testObject'"))

#13

Thank you, it working properly.


#15

I cannot find replacement for:

oxConfig::getInstance()->getConfigParam(‘gbfeeds’);

Can someone provide it to me?
Thank you.


#16

getConfigParam() is still there, no need to replace it


#17

@vanilla_thunder could you help me about this function:

https://pastebin.com/paFj0kTV

As you can see, from this line: $sArtTable = _getViewName(‘oxarticles’); -> oxarticles table exists in my database and is filled.

But I am receiving this error all the time:
[exception] [type OxidEsales\Eshop\Core\Exception\DatabaseErrorException] [code 1064] [file /var/www/html/oxid6/oxideshop_ce/source/Core/Database/Adapter/Doctrine/Database.php] [line 947] [message You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘from where 1 and .oxid = ‘oxexport’’ at line 1]

So, there is ‘oxarticles’ table and it’s not empty.


#18

i never said oxarticles table would be empty, i said your variable $sArtTable that is supposed to contain the view name of oxarticles is empty.
Just var_dump($sArtTable) and see whats inside. If its empty, then obviously _getViewName(‘oxarticles’); is not woking


#19

getViewName('oxarticles') not _getViewName('oxarticles')


#20

var_dump is not displaying nothing because when module is activated the shop is going offline.
I also changed _getViewName to getViewName but I am still receiving the same error.


#21

Add a die(); or exit; after var_dump.