AJAX Attribute Manager

AttributeManager changes for 1.0.8.5 - AJAX Attribute Manager

AttributeManager changes for 1.0.8.5

by vmn » Fri Sep 24, 2021 8:02 am

Hi,
I just installed AttributeManager into Phoenix 1.0.8.5 (my previous Phoenix version was 1.0.8.2).

Some changes are needed (these are mine):

1. admin/categories.php is now admin/catalog.php

Hooks: move AttributeManager hooks to catalog folder and replace all 'categories' strings with 'catalog' in AttributeManager hooks code.

2. in admin/attributeManager/attributeManager.php

foreach ($languages as $amLanguage) {
if ($attributeManager->getSelectedLanaguage() == $amLanguage['id']) {
//pre 1.0.8.5 echo '&nbsp;<button class="btn btn-info" type="button">' . tep_image(tep_catalog_href_link('includes/languages/' . $amLanguage['directory'] . '/images/' . $amLanguage['image']), $amLanguage['name'], '', '', '', false, 'lng mr-2') . $amLanguage['name'] . '</button>';
echo '&nbsp;<button class="btn btn-info" type="button">' . $Admin->catalog_image('includes/languages/' . $amLanguage['directory'] . '/images/' . $amLanguage['image'], ['class' => 'lng mr-2'], $amLanguage['name']) .'&nbsp;' . $amLanguage['name'] . '</button>';
} else {
//pre 1.0.8.5 echo '&nbsp;<button class="btn btn-outline-info" type="button" onclick="return amSetInterfaceLanguage(\''.$amLanguage['id'].'\');">' . tep_image(tep_catalog_href_link('includes/languages/' . $amLanguage['directory'] . '/images/' . $amLanguage['image']), $amLanguage['name'], '', '', '', false, 'lng mr-2') . $amLanguage['name'] . '</button>';
echo '&nbsp;<button class="btn btn-outline-info" type="button" onclick="return amSetInterfaceLanguage(\''.$amLanguage['id'].'\');">' . $Admin->catalog_image('includes/languages/' . $amLanguage['directory'] . '/images/' . $amLanguage['image'], ['class' => 'lng mr-2'], $amLanguage['name']) .'&nbsp;' . $amLanguage['name'] . '</button>';
}
}
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Contact:

Re: AttributeManager changes for 1.0.8.5

by vmn » Wed Sep 29, 2021 4:30 pm

Also, there are no productActionSave admin hook calls any more.

Instead, one should use insertProductAction and updateProductAction hooks.

This is what I did:
class hook_admin_catalog_ajaxAttribManager {
//VMNfunction listen_productActionSave() {

function listen_updateProductAction() {

include_once('attributeManager/includes/attributeManagerUpdateAtomic.inc.php');

}
...
}
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Contact:

Re: AttributeManager changes for 1.0.8.5

by raiwa » Thu Sep 30, 2021 7:54 am

Thank you :-)
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: AttributeManager changes for 1.0.8.5

by vmn » Thu Sep 30, 2021 10:05 am

YW. Now it might be possible to use AttributeManager already when adding products. Needs code changes, though.
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Contact: