Skip to content
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

Special for Products Date not working for current day #179

Closed
kd5cna opened this issue Oct 10, 2012 · 2 comments
Closed

Special for Products Date not working for current day #179

kd5cna opened this issue Oct 10, 2012 · 2 comments

Comments

@kd5cna
Copy link

kd5cna commented Oct 10, 2012

Opencart 1.5.4.1 and previous.
admin/controller/catalog/product.php
ISSUE: Special will not start on current date.
SOLUTION BELOW

REPLACE THE FOLLOWING

foreach ($product_specials as $product_special) {
if (($product_special['date_start'] == '0000-00-00' || $product_special['date_start'] < date('Y-m-d')) && ($product_special['date_end'] == '0000-00-00' || $product_special['date_end'] > date('Y-m-d'))) {
$special = $product_special['price'];

                break;
            }                   
        }

WITH THE FOLLOWING

foreach ($product_specials as $product_special) {
if (($product_special['date_start'] == '0000-00-00' || $product_special['date_start'] < date('Y-m-d') || $product_special['date_start'] == date('Y-m-d')) && ($product_special['date_end'] == '0000-00-00' || $product_special['date_end'] > date('Y-m-d'))) {
$special = $product_special['price'];

                break;
            }                   
        }
@opencart
Copy link
Collaborator

again works fine for me.

check what the date and time is on your host.

@kd5cna
Copy link
Author

kd5cna commented Oct 10, 2012

If you set the start date for current date it does not enable the special.
Looking at the code you can see how it could not possibly work as is.
On Oct 10, 2012 3:33 AM, "Daniel Kerr" notifications@github.com wrote:

again works fine for me.

check what the date and time is on your host.


Reply to this email directly or view it on GitHubhttps://github.com//issues/179#issuecomment-9293820.

savage4pro pushed a commit to savage4pro/opencart that referenced this issue Dec 7, 2015
догоняем оригинал
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant