- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
Ezequ #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            Ezequ
  wants to merge
  4
  commits into
  SummaSolutions:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
Ezequ:ezequ
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Ezequ #1
Changes from all commits
      Commits
    
    
            Show all changes
          
          
            4 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <?php | ||
| /** | ||
| * Created by PhpStorm. | ||
| * User: ezequiel | ||
| * Date: 08/12/15 | ||
| * Time: 13:30 | ||
| */ | ||
| class Training_Catalog_Helper_Data extends Mage_Core_Helper_Abstract { | ||
|  | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?php | ||
| /** | ||
| * Created by PhpStorm. | ||
| * User: ezequiel | ||
| * Date: 08/12/15 | ||
| * Time: 13:39 | ||
| */ | ||
|  | ||
| class Training_Catalog_Model_Observer { | ||
| public function catalogProductSaveAfter($observer) | ||
| { | ||
| $userLogged = Mage::getSingleton('admin/session')->getUser(); | ||
| $time = Mage::getModel('core/date')->date('Y-m-d H:i:s'); | ||
| $message = $time." - ".$userLogged->getName(); | ||
| Mage::log($message); | ||
| } | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?php | ||
| /** | ||
| * Created by PhpStorm. | ||
| * User: ezequiel | ||
| * Date: 08/12/15 | ||
| * Time: 16:20 | ||
| */ | ||
| class Training_Catalog_Model_Product | ||
| extends Company_Feed_Model_Catalog_Product | ||
| { | ||
| public function getProductUrl($useSid = null) { | ||
| $url = parent::getProductUrl($useSid); | ||
| if(Mage::helper('catalog')->isCategory()) { | ||
| $current_category = Mage::registry('current_category'); | ||
| $id = $current_category->getId(); | ||
| return $url."cat/".$id; | ||
| } | ||
| else return $url; | ||
| } | ||
| } | 
        
          
          
            21 changes: 21 additions & 0 deletions
          
          21 
        
  app/code/local/Training/Catalog/controllers/ProductController.php
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <?php | ||
| /** | ||
| * Created by PhpStorm. | ||
| * User: ezequiel | ||
| * Date: 08/12/15 | ||
| * Time: 15:39 | ||
| */ | ||
| require_once 'Company/Feed/controllers/Catalog/ProductController.php'; | ||
|  | ||
|  | ||
| class Training_Catalog_ProductController | ||
| extends Company_Feed_Catalog_ProductController { | ||
| public function feedAction() | ||
| { | ||
| $id = $this->getRequest()->getParam('id'); | ||
| $product = Mage::getModel('catalog/product')->load($id); | ||
| if($product->getVisibility() != Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE) | ||
| return parent::feedAction(); | ||
| else exit ("NOT VISIBLE"); | ||
| } | ||
| } | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| <?xml version="1.0"?> | ||
| <config> | ||
| <modules> | ||
| <Training_Catalog> | ||
| <version>0.1.0</version> | ||
| </Training_Catalog> | ||
| </modules> | ||
| <global> | ||
| <models> | ||
| <Training_catalog> | ||
| <class>Training_Catalog_Model</class> | ||
| </Training_catalog> | ||
| <catalog> | ||
| <rewrite> | ||
| <product>Training_Catalog_Model_Product</product> | ||
| </rewrite> | ||
| </catalog> | ||
| </models> | ||
| <helpers> | ||
| <Training_catalog> | ||
| <class>Training_Catalog_Helper</class> | ||
| </Training_catalog> | ||
| </helpers> | ||
| <blocks> | ||
| <Training_catalog> | ||
| <class>Training_Catalog_Block</class> | ||
| </Training_catalog> | ||
| </blocks> | ||
| <events> | ||
| <catalog_product_save_after> | ||
| <observers> | ||
| <Training_catalog_observer> | ||
| <type>singleton</type> | ||
| <class>Training_Catalog_Model_Observer</class> | ||
| <method>catalogProductSaveAfter</method> | ||
| </Training_catalog_observer> | ||
| </observers> | ||
| </catalog_product_save_after> | ||
| </events> | ||
| </global> | ||
| <frontend> | ||
| <routers> | ||
| <catalog> | ||
| <args> | ||
| <modules> | ||
| <Training_Catalog before="Company_Feed_Catalog">Training_Catalog</Training_Catalog> | ||
| </modules> | ||
| </args> | ||
| </catalog> | ||
| </routers> | ||
| </frontend> | ||
| </config> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| <?xml version="1.0"?> | ||
| <!-- | ||
| /** | ||
| * Magento | ||
| * | ||
| * NOTICE OF LICENSE | ||
| * | ||
| * This source file is subject to the Academic Free License (AFL 3.0) | ||
| * that is bundled with this package in the file LICENSE_AFL.txt. | ||
| * It is also available through the world-wide-web at this URL: | ||
| * http://opensource.org/licenses/afl-3.0.php | ||
| * If you did not receive a copy of the license and are unable to | ||
| * obtain it through the world-wide-web, please send an email | ||
| * to license@magento.com so we can send you a copy immediately. | ||
| * | ||
| * DISCLAIMER | ||
| * | ||
| * Do not edit or add to this file if you wish to upgrade Magento to newer | ||
| * versions in the future. If you wish to customize Magento for your | ||
| * needs please refer to http://www.magento.com for more information. | ||
| * | ||
| * @category Mage | ||
| * @package Mage_Core | ||
| * @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com) | ||
| * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
| */ | ||
| --> | ||
| <config> | ||
| <global> | ||
| <install> | ||
| <date><![CDATA[Tue, 08 Dec 2015 16:03:53 +0000]]></date> | ||
| </install> | ||
| <crypt> | ||
| <key><![CDATA[ce9bc9379ae980c42a5eb6c55ef9288f]]></key> | ||
| </crypt> | ||
| <disable_local_modules>false</disable_local_modules> | ||
| <resources> | ||
| <db> | ||
| <table_prefix><![CDATA[]]></table_prefix> | ||
| </db> | ||
| <default_setup> | ||
| <connection> | ||
| <host><![CDATA[localhost]]></host> | ||
| <username><![CDATA[root]]></username> | ||
| <password><![CDATA[yungacapo]]></password> | ||
| <dbname><![CDATA[training]]></dbname> | ||
| <initStatements><![CDATA[SET NAMES utf8]]></initStatements> | ||
| <model><![CDATA[mysql4]]></model> | ||
| <type><![CDATA[pdo_mysql]]></type> | ||
| <pdoType><![CDATA[]]></pdoType> | ||
| <active>1</active> | ||
| </connection> | ||
| </default_setup> | ||
| </resources> | ||
| <session_save><![CDATA[files]]></session_save> | ||
| </global> | ||
| <admin> | ||
| <routers> | ||
| <adminhtml> | ||
| <args> | ||
| <frontName><![CDATA[admin]]></frontName> | ||
| </args> | ||
| </adminhtml> | ||
| </routers> | ||
| </admin> | ||
| </config> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <?xml version="1.0"?> | ||
| <config> | ||
| <modules> | ||
| <Training_Catalog> | ||
| <active>true</active> | ||
| <codePool>local</codePool> | ||
| </Training_Catalog> | ||
| </modules> | ||
| </config> | 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Según el requerimiento debería redireccionar a la 404 Page.
Pero en términos generales esta bien