cubecart / v6

CubeCart Version 6
https://cubecart.com
72 stars 58 forks source link

Sales Item link displays in Navigation despite no Items on Sale #2295

Closed sumwonlost closed 5 years ago

sumwonlost commented 5 years ago

Clean install - change the On Sale price for Test Product to 0.00.

The On Sale sidebox no longer displays as there are no products On Sale, however the Sale Items link still displays in Navigation. This should also not display if there are no products On Sale.

bhsmither commented 5 years ago

Currently, this link appears if a test at GUI->_displayNavigation() determines if the Store Settings has "Sales Mode" set to anything other than disabled -- regardless if there are any products that have an actual valid sale price.

Suggest:

That GUI->_displaySaleItems() return true if any sale items are to be shown in the Sale Items box ($vars is not empty) -- with possibly setting a session variable, and

Move $this->_displayNavigation(); in GUI->displayCommon() to the bottom of the stack of _display calls so that GUI->_displayNavigation() can test the session variable in its assignment of CTRL_SALE.

abrookbanks commented 5 years ago

Thanks guys! :)