File tree 4 files changed +17
-5
lines changed
4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ public function getClerkExportData()
24
24
{
25
25
$ data = new Varien_Object ();
26
26
27
- $ data ->setAge ((int ) $ this ->getAge ());
27
+ $ data ->setAge ((int )$ this ->getAge ());
28
28
$ data ->setCategories (array_map ('intval ' , $ this ->getCategoryIds ()));
29
29
$ data ->setDescription ($ this ->getDescription () ? $ this ->getDescription () : '' );
30
30
$ data ->setHasTierprice ($ this ->hasTierPrice ());
31
- $ data ->setId ((int ) $ this ->getId ());
31
+ $ data ->setId ((int )$ this ->getId ());
32
32
$ data ->setImage ($ this ->getClerkImageUrl ());
33
33
$ data ->setIsOnSale ($ this ->isOnSale ());
34
34
$ data ->setManufacturer ($ this ->getManufacturer ());
@@ -67,8 +67,10 @@ public function setExcludeReason()
67
67
$ this ->excludeReason = 'Product not visible ' ;
68
68
}
69
69
70
- if (!$ this ->isSalable ()) {
71
- $ this ->excludeReason = 'Product is not saleable ' ;
70
+ if (!Mage::getStoreConfigFlag ('clerk/general/include_out_of_stock_products ' )) {
71
+ if (!$ this ->isSalable ()) {
72
+ $ this ->excludeReason = 'Product is not saleable ' ;
73
+ }
72
74
}
73
75
74
76
if ($ this ->getStatus () == Mage_Catalog_Model_Product_Status::STATUS_DISABLED ) {
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ public function load($page, $limit)
19
19
->addStoreFilter ();
20
20
21
21
//Only grab products in stock
22
- Mage::getSingleton ('cataloginventory/stock ' )->addInStockFilterToCollection ($ this ->collection );
22
+ if (!Mage::getStoreConfigFlag ('clerk/general/include_out_of_stock_products ' )) {
23
+ Mage::getSingleton ('cataloginventory/stock ' )->addInStockFilterToCollection ($ this ->collection );
24
+ }
23
25
24
26
$ this ->totalPages = $ this ->collection ->getLastPageNumber ();
25
27
$ this ->fetch ();
Original file line number Diff line number Diff line change 181
181
<active >0</active >
182
182
<collect_emails >1</collect_emails >
183
183
<disable_order_synchronization >0</disable_order_synchronization >
184
+ <include_out_of_stock_products >0</include_out_of_stock_products >
184
185
</general >
185
186
<search >
186
187
<active >0</active >
Original file line number Diff line number Diff line change 76
76
<show_in_store >1</show_in_store >
77
77
<source_model >adminhtml/system_config_source_yesno</source_model >
78
78
</disable_order_synchronization >
79
+ <include_out_of_stock_products >
80
+ <label >Include Out Of Stock Products</label >
81
+ <frontend_type >select</frontend_type >
82
+ <sort_order >40</sort_order >
83
+ <show_in_store >1</show_in_store >
84
+ <source_model >adminhtml/system_config_source_yesno</source_model >
85
+ </include_out_of_stock_products >
79
86
<url >
80
87
<label >Import url</label >
81
88
<frontend_type >select</frontend_type >
You can’t perform that action at this time.
0 commit comments