getParameter() - OXID 6.0

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

You have to use getRequestParameter() :wink:

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.

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(*)…’)

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

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(*)…’)

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

It’s okay, I fixed it.

Thanks for helping!

what was the problem?

It should be:

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

Correct me if I am wrong.

no * … example:

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

Thank you, it working properly.

I cannot find replacement for:

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

Can someone provide it to me?
Thank you.

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

@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.

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

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

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.

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

1 Like