Mirza, There is no article_bundle controller, so I think it's another entity. The aoc parameter is used in the render function, when the popup is opened. I was talking about the JS initAoc function which initializes the containers, it is located in the template (article_facility.tpl). Did you just give a try to my suggestion?
Best regards, Nicolas Hodin www.fasteroxid.com ᐧ 2015-09-03 10:25 GMT+02:00 Mirza Ahtasham Ahmad <[email protected]>: > Hi Nicolas, > > As far as I understood it, it call the actual controller like the > article_extent or article_bundle and there in it there is a switch for > popup tpl or normal tpl thats why the aoc. > > So technically the loading of categories or any relation in the left > container for the popup should take place in the controller. > > > > > > > *Mit freundlichen Grüßen | **Warm Regards**,* > > Mirza Ahmad > M +4917645387460 | Skype: ahtasham82 > > > > > > On Thu, Sep 3, 2015 at 9:55 AM, Nicolas Hodin <[email protected]> wrote: > >> Hi Mirza, >> >> I looked at your code and also to the source code of Oxid back office and >> it seems that you're doing well, maybe there is just a little thing that >> you forgot. Did you change the code of the popups/article_facility.tpl >> file? >> I saw "container=article_extend" in the js scripts of article_extend.tpl >> which are "container=article_bundle" in article_bundle.tpl, maybe you have >> to change this part with "container=article_facility"? >> >> I hope it will help... >> >> Best regards, >> >> Nicolas Hodin >> www.fasteroxid.com >> >> >> ᐧ >> >> 2015-09-03 9:34 GMT+02:00 Mirza Ahtasham Ahmad <[email protected]>: >> >>> Hi Guys, >>> >>> So no one knows the answer? No one know how the left column is loaded in >>> the popup? >>> >>> >>> >>> >>> *Mit freundlichen Grüßen | **Warm Regards**,* >>> >>> Mirza Ahmad >>> M +4917645387460 | Skype: ahtasham82 >>> >>> >>> >>> >>> >>> On Wed, Sep 2, 2015 at 11:17 AM, Mirza Ahtasham Ahmad < >>> [email protected]> wrote: >>> >>>> Hi, >>>> >>>> Here the code from artile_extent.tpl for the buttons. >>>> >>>> <input [{ $readonly }] type="button" value="[{ oxmultilang >>>> ident="GENERAL_ASSIGNCATEGORIES" }]" class="edittext" >>>> onclick="JavaScript:showDialog('&cl=article_extend&aoc=1&oxid=[{ $oxid >>>> }]');"> >>>> | >>>> <input [{ $readonly }] type="button" value="[{ oxmultilang >>>> ident="GENERAL_ASSIGNFACILITIES" }]" class="edittext" >>>> onclick="JavaScript:showDialog('&cl=article_extend&aoc=3&oxid=[{ $oxid >>>> }]');"> >>>> >>>> >>>> I only changedd the aoc value for my new button and added an extra >>>> check for that in article_extend.php >>>> >>>> } elseif ($iAoc == 3) { >>>> $oArticleBundleAjax = oxNew('article_facility_ajax'); >>>> $this->_aViewData['oxajax'] = $oArticleBundleAjax->getColumns(); >>>> >>>> return "popups/article_facility.tpl"; >>>> >>>> } >>>> >>>> >>>> Thanks for your quick reply. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *Mit freundlichen Grüßen | **Warm Regards**,* >>>> >>>> Mirza Ahmad >>>> M +4917645387460 | Skype: ahtasham82 >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Sep 2, 2015 at 11:10 AM, Mirza Ahtasham Ahmad < >>>> [email protected]> wrote: >>>> >>>>> Hi Tim, >>>>> >>>>> Here is my _getQuery() method in article_facility_ajax >>>>> >>>>> /** >>>>> * Returns SQL query for data to fetc >>>>> * >>>>> * @return string >>>>> */ >>>>> protected function _getQuery() >>>>> { >>>>> $sFacilitiesTable = $this->_getViewName('facilities'); >>>>> $sO2CView = $this->_getViewName('object2facility'); >>>>> $oDb = oxDb::getDb(); >>>>> >>>>> $sOxid = oxRegistry::getConfig()->getRequestParameter('oxid'); >>>>> $sSynchOxid = >>>>> oxRegistry::getConfig()->getRequestParameter('synchoxid'); >>>>> >>>>> if ($sOxid) { >>>>> $sQAdd = " from $sO2CView left join $sFacilitiesTable on >>>>> $sFacilitiesTable.oxid=$sO2CView.facilityid "; >>>>> $sQAdd .= " where $sO2CView.oxobjectid = " . >>>>> $oDb->quote($sOxid) >>>>> . " and $sFacilitiesTable.oxid is not null "; >>>>> } else { >>>>> $sQAdd = " from $sFacilitiesTable where >>>>> $sFacilitiesTable.oxid not in ( "; >>>>> $sQAdd .= " select $sFacilitiesTable.oxid from $sO2CView " >>>>> . "left join $sFacilitiesTable on >>>>> $sFacilitiesTable.oxid=$sO2CView.facilityid "; >>>>> $sQAdd .= " where $sO2CView.oxobjectid = " . >>>>> $oDb->quote($sSynchOxid) >>>>> . " and $sFacilitiesTable.oxid is not null ) and >>>>> $sFacilitiesTable.oxpriceto = '0'"; >>>>> } >>>>> >>>>> return $sQAdd; >>>>> } >>>>> >>>>> >>>>> I simply replaced the categories and object2categories with mine two >>>>> new tables. >>>>> >>>>> >>>>> What am I doing wrong that I cant see. Looking forward to your reply. >>>>> >>>>> Thanks, >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *Mit freundlichen Grüßen | **Warm Regards**,* >>>>> >>>>> Mirza Ahmad >>>>> M +4917645387460 | Skype: ahtasham82 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Wed, Sep 2, 2015 at 11:01 AM, Tim Aniol <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi Mirza >>>>>> >>>>>> what does the _getQuery() Method in your ajax class do? If you have >>>>>> copied the article_extend_ajax class then it'll be select oxcategories. >>>>>> >>>>>> BR >>>>>> Tim >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Viele Grüße, >>>>>> >>>>>> Tim Aniol >>>>>> Senior Software-Entwickler >>>>>> >>>>>> Tel.: 0911 / 1809 45 - 30 >>>>>> [email protected] >>>>>> PGP-Key: F2979268 >>>>>> <http://pgp.mit.edu/pks/lookup?op=vindex&search=0x1FFB423FF2979268> >>>>>> >>>>>> solutionDrive GmbH >>>>>> Innere Hallerstraße 8a, 90419 Nürnberg >>>>>> Amtsgericht Nürnberg, HRB 28464 >>>>>> GF Andreas Illig >>>>>> http://www.solutionDrive.de >>>>>> Tel +49 911 1809 45-29, Fax +49 911 1809 45-31 >>>>>> [email protected] >>>>>> >>>>>> Vernetzen Sie sich mit uns auf Xing >>>>>> <https://www.xing.com/companies/solutiondrivegmbh> und Facebook >>>>>> <https://www.facebook.com/solutiondrivegmbh> oder folgen Sie uns auf >>>>>> Twitter <https://twitter.com/solutiondrive>! >>>>>> Am 02.09.15 um 10:43 schrieb Mirza Ahtasham Ahmad: >>>>>> >>>>>> Hi Everyone, >>>>>> >>>>>> I have an extra relation for articles. The new Table is named >>>>>> facilities and the relation table is object2facilities. I want to assign >>>>>> the these facilities to the articles just like the relation >>>>>> object2category. >>>>>> >>>>>> oxobject2category and mein object2facility are exactly the same just >>>>>> instead of catnid there is facilityid. >>>>>> >>>>>> For the assigning purpose I copied the "assign categories" button in >>>>>> the article_extend module. I adjusted/created the new popup and ajax >>>>>> files >>>>>> for it too (simply copied the one which were used for assign categories) >>>>>> >>>>>> Now the problem is, that when I click on my new button, "assign >>>>>> facilities", the popup shows up, but it loads the categories into the >>>>>> left >>>>>> container of the popup. I need to load facilities from my new facilities >>>>>> table. I cant figure it out where those are loaded. Can anybody help me >>>>>> here where I need to load my facilities and pass it to the popup >>>>>> template?? >>>>>> >>>>>> >>>>>> PS: In my new ajax module (article_facility_ajax) I have adjusted the >>>>>> Columns array and it looks like this. >>>>>> >>>>>> /** >>>>>> * Columns array >>>>>> * >>>>>> * @var array >>>>>> */ >>>>>> protected $_aColumns = array('container1' => array( // field , >>>>>> table, visible, multilanguage, ident >>>>>> array('title', 'facilities', 1, 1, 0), >>>>>> array('info', 'facilities', 1, 1, 0), >>>>>> array('oxid', 'facilities', 0, 0, 0), >>>>>> array('oxid', 'facilities', 0, 0, 1) >>>>>> ), >>>>>> 'container2' => array( >>>>>> array('title', 'facilities', 1, >>>>>> 1, 0), >>>>>> array('info', 'facilities', 1, >>>>>> 1, 0), >>>>>> array('oxid', 'facilities', 0, >>>>>> 0, 0), >>>>>> array('oxid', 'object2facility', >>>>>> 0, 0, 1), >>>>>> array('oxtime', >>>>>> 'object2facility', 0, 0, 1), >>>>>> array('oxid', 'facilities', 0, >>>>>> 0, 1) >>>>>> ), >>>>>> ); >>>>>> >>>>>> >>>>>> >>>>>> Looking forward to your help. >>>>>> >>>>>> Thanks, >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *Mit freundlichen Grüßen | **Warm Regards**,* >>>>>> >>>>>> Mirza Ahmad >>>>>> M +4917645387460 | Skype: ahtasham82 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> dev-general mailing >>>>>> [email protected]http://dir.gmane.org/gmane.comp.php.oxid.general >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> dev-general mailing list >>>>>> [email protected] >>>>>> http://dir.gmane.org/gmane.comp.php.oxid.general >>>>>> >>>>> >>>>> >>>> >>> >>> _______________________________________________ >>> dev-general mailing list >>> [email protected] >>> http://dir.gmane.org/gmane.comp.php.oxid.general >>> >> >> >> _______________________________________________ >> dev-general mailing list >> [email protected] >> http://dir.gmane.org/gmane.comp.php.oxid.general >> > > > _______________________________________________ > dev-general mailing list > [email protected] > http://dir.gmane.org/gmane.comp.php.oxid.general >
_______________________________________________ dev-general mailing list [email protected] http://dir.gmane.org/gmane.comp.php.oxid.general
