How to add product updated date as sort order using custom extensionHow to set (in admin) products of a certain category to default sort by date addedCategory Sorting: Add custom “Available Product Listing Sort by” option in admin panelAdd custom field to IWD One page Checkout ExtensionHow to add field like 'custom products' in Magento admin form?automatic add the product's Set Product as New from DateChanging a custom attribute's sort order in Default Product Listing Sort By in Display SettingsUpdate/change the sort order for existing product attribute using upgrade scripts?Add field “sort order”Custom Sorting for Product collection based on position, best seller and product created dateMagento 2 How to send order email copy to custom email address with custom module when order placed?

How can I successfully establish a nationwide combat training program for a large country?

Science Fiction story where a man invents a machine that can help him watch history unfold

Why does this part of the Space Shuttle launch pad seem to be floating in air?

Can I Retrieve Email Addresses from BCC?

Why isn't KTEX's runway designation 10/28 instead of 9/27?

Reply ‘no position’ while the job posting is still there (‘HiWi’ position in Germany)

A known event to a history junkie

What is the opposite of 'gravitas'?

Is a naturally all "male" species possible?

Did US corporations pay demonstrators in the German demonstrations against article 13?

What if somebody invests in my application?

Would it be legal for a US State to ban exports of a natural resource?

node command while defining a coordinate in TikZ

Visiting the UK as unmarried couple

Can I use my Chinese passport to enter China after I acquired another citizenship?

What should I use for Mishna study?

Simulating a probability of 1 of 2^N with less than N random bits

How do I repair my stair bannister?

Lifted its hind leg on or lifted its hind leg towards?

Books on the History of math research at European universities

What is the term when two people sing in harmony, but they aren't singing the same notes?

Is there a good way to store credentials outside of a password manager?

Simple image editor tool to draw a simple box/rectangle in an existing image

Can a Gentile theist be saved?



How to add product updated date as sort order using custom extension


How to set (in admin) products of a certain category to default sort by date addedCategory Sorting: Add custom “Available Product Listing Sort by” option in admin panelAdd custom field to IWD One page Checkout ExtensionHow to add field like 'custom products' in Magento admin form?automatic add the product's Set Product as New from DateChanging a custom attribute's sort order in Default Product Listing Sort By in Display SettingsUpdate/change the sort order for existing product attribute using upgrade scripts?Add field “sort order”Custom Sorting for Product collection based on position, best seller and product created dateMagento 2 How to send order email copy to custom email address with custom module when order placed?













1















I want to add product updated date as sort order but I don't want to add Updated date field in product setting page which means if admin updates a product, it's edited date should be detected automatically.



Ref:
enter image description here



I want to achieve this using custom module.



I am using magento 1.9.0.1.










share|improve this question














bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.

    – Dhiren Vasoya
    Sep 26 '16 at 7:12











  • Which function I should override in list.php ?

    – Hiranya Sarma
    Sep 26 '16 at 7:19












  • I added answer please check and if it used full please mark as solution, so other also get help.

    – Dhiren Vasoya
    Sep 26 '16 at 7:21















1















I want to add product updated date as sort order but I don't want to add Updated date field in product setting page which means if admin updates a product, it's edited date should be detected automatically.



Ref:
enter image description here



I want to achieve this using custom module.



I am using magento 1.9.0.1.










share|improve this question














bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.

    – Dhiren Vasoya
    Sep 26 '16 at 7:12











  • Which function I should override in list.php ?

    – Hiranya Sarma
    Sep 26 '16 at 7:19












  • I added answer please check and if it used full please mark as solution, so other also get help.

    – Dhiren Vasoya
    Sep 26 '16 at 7:21













1












1








1








I want to add product updated date as sort order but I don't want to add Updated date field in product setting page which means if admin updates a product, it's edited date should be detected automatically.



Ref:
enter image description here



I want to achieve this using custom module.



I am using magento 1.9.0.1.










share|improve this question














I want to add product updated date as sort order but I don't want to add Updated date field in product setting page which means if admin updates a product, it's edited date should be detected automatically.



Ref:
enter image description here



I want to achieve this using custom module.



I am using magento 1.9.0.1.







magento-1.9 module sorting list-view






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 26 '16 at 6:52









Hiranya SarmaHiranya Sarma

185112




185112





bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.

    – Dhiren Vasoya
    Sep 26 '16 at 7:12











  • Which function I should override in list.php ?

    – Hiranya Sarma
    Sep 26 '16 at 7:19












  • I added answer please check and if it used full please mark as solution, so other also get help.

    – Dhiren Vasoya
    Sep 26 '16 at 7:21

















  • Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.

    – Dhiren Vasoya
    Sep 26 '16 at 7:12











  • Which function I should override in list.php ?

    – Hiranya Sarma
    Sep 26 '16 at 7:19












  • I added answer please check and if it used full please mark as solution, so other also get help.

    – Dhiren Vasoya
    Sep 26 '16 at 7:21
















Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.

– Dhiren Vasoya
Sep 26 '16 at 7:12





Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.

– Dhiren Vasoya
Sep 26 '16 at 7:12













Which function I should override in list.php ?

– Hiranya Sarma
Sep 26 '16 at 7:19






Which function I should override in list.php ?

– Hiranya Sarma
Sep 26 '16 at 7:19














I added answer please check and if it used full please mark as solution, so other also get help.

– Dhiren Vasoya
Sep 26 '16 at 7:21





I added answer please check and if it used full please mark as solution, so other also get help.

– Dhiren Vasoya
Sep 26 '16 at 7:21










1 Answer
1






active

oldest

votes


















0














Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.



For List.php override, you need to do following code :



In your extension config.xml file write following :



<blocks>
<myextension>
<class>Mymodule_Myextension_Block</class>
</myextension>
<catalog>
<rewrite>
<product_list_toolbar>Mymodule_Myextension_Block_Catalog_Product_List_Toolbar</product_list_toolbar>
</rewrite>
</catalog>
</blocks>


And create Block file Mymodule/Myextension/Block/Catalog/Product/List/Toolbar.php code:



<?php
class Mymodule_Myextension_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar


?>


And there is function _getProductCollection() which create collection, you need to customized this collection.






share|improve this answer























  • You asked to override Mage_Catalog_Block_Product_List_Toolbar but _getProductCollection() is not located inside this class,how is it possible? also I want Updated date should be visible in drop-down like price.

    – Hiranya Sarma
    Sep 26 '16 at 7:28











  • If possible, provide full answer otherwise it will take much time to understand.

    – Hiranya Sarma
    Sep 26 '16 at 7:29











  • Here is the complete path of file : appcodecoreMageCatalogBlockProductList.php And check line no. 56 there is a function protected function _getProductCollection().

    – Dhiren Vasoya
    Sep 26 '16 at 9:28










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f138008%2fhow-to-add-product-updated-date-as-sort-order-using-custom-extension%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.



For List.php override, you need to do following code :



In your extension config.xml file write following :



<blocks>
<myextension>
<class>Mymodule_Myextension_Block</class>
</myextension>
<catalog>
<rewrite>
<product_list_toolbar>Mymodule_Myextension_Block_Catalog_Product_List_Toolbar</product_list_toolbar>
</rewrite>
</catalog>
</blocks>


And create Block file Mymodule/Myextension/Block/Catalog/Product/List/Toolbar.php code:



<?php
class Mymodule_Myextension_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar


?>


And there is function _getProductCollection() which create collection, you need to customized this collection.






share|improve this answer























  • You asked to override Mage_Catalog_Block_Product_List_Toolbar but _getProductCollection() is not located inside this class,how is it possible? also I want Updated date should be visible in drop-down like price.

    – Hiranya Sarma
    Sep 26 '16 at 7:28











  • If possible, provide full answer otherwise it will take much time to understand.

    – Hiranya Sarma
    Sep 26 '16 at 7:29











  • Here is the complete path of file : appcodecoreMageCatalogBlockProductList.php And check line no. 56 there is a function protected function _getProductCollection().

    – Dhiren Vasoya
    Sep 26 '16 at 9:28















0














Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.



For List.php override, you need to do following code :



In your extension config.xml file write following :



<blocks>
<myextension>
<class>Mymodule_Myextension_Block</class>
</myextension>
<catalog>
<rewrite>
<product_list_toolbar>Mymodule_Myextension_Block_Catalog_Product_List_Toolbar</product_list_toolbar>
</rewrite>
</catalog>
</blocks>


And create Block file Mymodule/Myextension/Block/Catalog/Product/List/Toolbar.php code:



<?php
class Mymodule_Myextension_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar


?>


And there is function _getProductCollection() which create collection, you need to customized this collection.






share|improve this answer























  • You asked to override Mage_Catalog_Block_Product_List_Toolbar but _getProductCollection() is not located inside this class,how is it possible? also I want Updated date should be visible in drop-down like price.

    – Hiranya Sarma
    Sep 26 '16 at 7:28











  • If possible, provide full answer otherwise it will take much time to understand.

    – Hiranya Sarma
    Sep 26 '16 at 7:29











  • Here is the complete path of file : appcodecoreMageCatalogBlockProductList.php And check line no. 56 there is a function protected function _getProductCollection().

    – Dhiren Vasoya
    Sep 26 '16 at 9:28













0












0








0







Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.



For List.php override, you need to do following code :



In your extension config.xml file write following :



<blocks>
<myextension>
<class>Mymodule_Myextension_Block</class>
</myextension>
<catalog>
<rewrite>
<product_list_toolbar>Mymodule_Myextension_Block_Catalog_Product_List_Toolbar</product_list_toolbar>
</rewrite>
</catalog>
</blocks>


And create Block file Mymodule/Myextension/Block/Catalog/Product/List/Toolbar.php code:



<?php
class Mymodule_Myextension_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar


?>


And there is function _getProductCollection() which create collection, you need to customized this collection.






share|improve this answer













Magento provide in built field "updated_at" in table "catalog_product_entity", you can used that field. You need to overide list.php file to in custom extension to override sorting functionlity work with this field.



For List.php override, you need to do following code :



In your extension config.xml file write following :



<blocks>
<myextension>
<class>Mymodule_Myextension_Block</class>
</myextension>
<catalog>
<rewrite>
<product_list_toolbar>Mymodule_Myextension_Block_Catalog_Product_List_Toolbar</product_list_toolbar>
</rewrite>
</catalog>
</blocks>


And create Block file Mymodule/Myextension/Block/Catalog/Product/List/Toolbar.php code:



<?php
class Mymodule_Myextension_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar


?>


And there is function _getProductCollection() which create collection, you need to customized this collection.







share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 26 '16 at 7:20









Dhiren VasoyaDhiren Vasoya

4,38151844




4,38151844












  • You asked to override Mage_Catalog_Block_Product_List_Toolbar but _getProductCollection() is not located inside this class,how is it possible? also I want Updated date should be visible in drop-down like price.

    – Hiranya Sarma
    Sep 26 '16 at 7:28











  • If possible, provide full answer otherwise it will take much time to understand.

    – Hiranya Sarma
    Sep 26 '16 at 7:29











  • Here is the complete path of file : appcodecoreMageCatalogBlockProductList.php And check line no. 56 there is a function protected function _getProductCollection().

    – Dhiren Vasoya
    Sep 26 '16 at 9:28

















  • You asked to override Mage_Catalog_Block_Product_List_Toolbar but _getProductCollection() is not located inside this class,how is it possible? also I want Updated date should be visible in drop-down like price.

    – Hiranya Sarma
    Sep 26 '16 at 7:28











  • If possible, provide full answer otherwise it will take much time to understand.

    – Hiranya Sarma
    Sep 26 '16 at 7:29











  • Here is the complete path of file : appcodecoreMageCatalogBlockProductList.php And check line no. 56 there is a function protected function _getProductCollection().

    – Dhiren Vasoya
    Sep 26 '16 at 9:28
















You asked to override Mage_Catalog_Block_Product_List_Toolbar but _getProductCollection() is not located inside this class,how is it possible? also I want Updated date should be visible in drop-down like price.

– Hiranya Sarma
Sep 26 '16 at 7:28





You asked to override Mage_Catalog_Block_Product_List_Toolbar but _getProductCollection() is not located inside this class,how is it possible? also I want Updated date should be visible in drop-down like price.

– Hiranya Sarma
Sep 26 '16 at 7:28













If possible, provide full answer otherwise it will take much time to understand.

– Hiranya Sarma
Sep 26 '16 at 7:29





If possible, provide full answer otherwise it will take much time to understand.

– Hiranya Sarma
Sep 26 '16 at 7:29













Here is the complete path of file : appcodecoreMageCatalogBlockProductList.php And check line no. 56 there is a function protected function _getProductCollection().

– Dhiren Vasoya
Sep 26 '16 at 9:28





Here is the complete path of file : appcodecoreMageCatalogBlockProductList.php And check line no. 56 there is a function protected function _getProductCollection().

– Dhiren Vasoya
Sep 26 '16 at 9:28

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f138008%2fhow-to-add-product-updated-date-as-sort-order-using-custom-extension%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Sum ergo cogito? 1 nng

419 nièngy_Soadمي 19bal1.5o_g

Queiggey Chernihivv 9NnOo i Zw X QqKk LpB