2

i worte code to modify product name and url .

i am able to change name but url does not works below is mycode :

    public function modifyallname(Varien_Event_Observer $observer) {
        $products = $observer->getCollection();
        foreach( $products as $product )
        {
            $product->setUrlKey('111');
            $product->setName($product->getName().' & '.$pricetoadd->getName().' '.$customprice);
        }
   }
  • To change URL, Run indexing for url – Rohit Kundale Mar 12 '16 at 12:03
  • can you remove cache? – Ajay Patel Mar 12 '16 at 12:04
  • not work :(...... – mdeveloper Mar 12 '16 at 15:17
1

Fix this issue. Do following thing

  1. To change URL, Run indexing for url
  2. Clear cache

Hope this works

| improve this answer | |
  • not works bro.. – mdeveloper Mar 12 '16 at 13:47
  • sorry not mispelt as now – mdeveloper Mar 12 '16 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.