Advertisement:

Author Topic: Redirect after an ad has been posted  (Read 764 times)

ezybusy

  • Full Member
  • ***
  • Posts: 193
Redirect after an ad has been posted
« on: June 01, 2016, 08:09:26 am »
Hi fellows,
Please can someone tell me what file handles the redirect after an item has been published?
I mean the page that shows up to the ad publisher and says your ad has been published successfully.
Thanks,
regards

teseo

  • Hero Member
  • *****
  • Posts: 6169

ezybusy

  • Full Member
  • ***
  • Posts: 193
Re: Redirect after an ad has been posted
« Reply #2 on: June 01, 2016, 06:34:02 pm »
Thank you TESEO.
But am currently looking for the name of that particular page that say Your listing has ben published successfully not for a redirect.
After the user clicks on the publish button and things go on well, the url of that page in the browser is like the following: http://thewebsite.com/maincategory/sub-category

Is it the ITEM.PHP page or any other page?

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Redirect after an ad has been posted
« Reply #3 on: June 01, 2016, 06:46:55 pm »
Oh, I see.

oc-includes/osclass/controller/item.php

Line 165 on current Osclass 3.6.1:

Code: [Select]
                            osc_add_flash_ok_message( _m('Your listing has been published') );
                        }

                        $itemId         = Params::getParam('itemId');

                        $category = Category::newInstance()->findByPrimaryKey(Params::getParam('catId'));
                        View::newInstance()->_exportVariableToView('category', $category);
                        $this->redirectTo(osc_search_category_url());
                    }

Take into account that this is core file, if you modify it, you'll need to redo the modification every time you upgrade Osclass.

Regards

ezybusy

  • Full Member
  • ***
  • Posts: 193
Re: Redirect after an ad has been posted
« Reply #4 on: June 01, 2016, 09:24:47 pm »
Thank you very much TESEO.
Thank you for taking the time to help me out.

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Redirect after an ad has been posted
« Reply #5 on: June 01, 2016, 09:58:18 pm »
No problem, regards