View Issue Details

IDProjectCategoryView StatusLast Update
0007100OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2021-04-27 08:57
Reporternitin.singh 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version6.1.2 
Target VersionFixed in Version 
Summary0007100: voucher doesn't work in case same voucher number been used for multiple voucherseries
DescriptionWe had one use case where customer used some voucher number for multiple voucherseries and one voucherseries got expired and second voucherseries is still live. Then, if you use related voucher then it doesn't work and give you error.
Steps To ReproduceAdded by QA - SG - :
1. Add Serie "Test 1" with code "test"
2. Add Serie "Test 2" with code "test"
3. Set Test 1 to be deactivated
4. the code "test" won't be accepted.

TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

nitin.singh

2020-02-21 17:11

reporter   ~0013134

We have fixed this issue with attached patch.

oxps_patches_oxvoucher.php (6,329 bytes)

QA

2020-02-24 08:59

administrator   ~0013135

For me personally it is more a bug to allow the same code to be used. If both series are active, how can the shop know with series should be assigned?
Therefore to prevent such behavior, I recommend forbidding usage of the same code.
QA - SG -

kukulcan

2021-04-22 08:25

reporter   ~0013426

Sorry, QA, but that makes not much sense. This is a bug that should be fixed.

Marketing stuff like coupon codes is often handled by external and changing service providers and they won't keep lists or check those of predecessors.

If you believe using the same code again is bad style then please fix the bug by providing the user with a warning.

QA

2021-04-22 11:21

administrator   ~0013427

Dear kukulcan,

that there is a issue software side, i acknowledge. therefore the bug was set to status acknowledged and not to the status closed, so it will be fixed and the whole issue will be solved in the future.

Best Regards

QA -SG-

kukulcan

2021-04-27 07:38

reporter   ~0013430

Last edited: 2021-04-27 07:48

View 2 revisions

Thanks for the clarification, QA.

@nitin.singh - The supposed patch does not work if vouchers have no start and no end date. I think it should be:

$sQ .= " and ({$sSeriesViewName}.oxenddate >= NOW() OR {$sSeriesViewName}.oxenddate IS NULL)";

nitin.singh

2021-04-27 08:57

reporter   ~0013431

@kukulcan - Thanks for noticing edge case. OXENDDATE field is not null but having default value '0000-00-00 00:00:00'.
So, i think you can write query like this.

$sQ .= " and ({$sSeriesViewName}.oxenddate >= NOW() OR {$sSeriesViewName}.oxenddate = '0000-00-00 00:00:00')";

Field Type:
`OXENDDATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Valid to'