GithubHelp home page GithubHelp logo

Monetary value? about laravel-promocodes HOT 16 CLOSED

zgabievi avatar zgabievi commented on July 17, 2024
Monetary value?

from laravel-promocodes.

Comments (16)

zgabievi avatar zgabievi commented on July 17, 2024

Hi @dayaki.
Sorry for late reply.
I hadn't planned to work on monetary value. But I like that idea and I think that I will work on that for next version.

from laravel-promocodes.

dayaki avatar dayaki commented on July 17, 2024

@zgabievi Thanks, any timeline as to when you can work on this? Could you give me directions on how I can implement this? as i love to include this in an ongoing project.

Thanks

from laravel-promocodes.

zgabievi avatar zgabievi commented on July 17, 2024

@dayaki easies way to implement this is to use if condition. If I understood you correctly you can do something like this:

$applied = Promocodes::apply('TEST-CODE');

if ($applied) {
    // do some action. give user something ))
}

If you didn't mean this you can contact me on my email and I will try to help you ;)

from laravel-promocodes.

dayaki avatar dayaki commented on July 17, 2024

Thanks, sent you an email.

from laravel-promocodes.

zgabievi avatar zgabievi commented on July 17, 2024

Oh, now I see. Great idea. I will work on that today. And will inform you about updates. Thank you for this idea

On May 17, 2016, at 19:05, Dayo Akinkuowo [email protected] wrote:

Thanks, sent you an email.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #1 (comment)

from laravel-promocodes.

dayaki avatar dayaki commented on July 17, 2024

Thanks so much, will be expecting

from laravel-promocodes.

zgabievi avatar zgabievi commented on July 17, 2024

from laravel-promocodes.

dayaki avatar dayaki commented on July 17, 2024

Awesome man, do i need to update/reinstall your package to make use of the changes? because I did composer update and your package didnt update

from laravel-promocodes.

zgabievi avatar zgabievi commented on July 17, 2024

You need to update to 0.1.2 version

from laravel-promocodes.

zgabievi avatar zgabievi commented on July 17, 2024

@dayaki Can we close this issue?

from laravel-promocodes.

dayaki avatar dayaki commented on July 17, 2024

am getting this error:

screen-shot-2016-05-20-at-11 47 35-am

from laravel-promocodes.

zgabievi avatar zgabievi commented on July 17, 2024

Sorry, there was symbol mistake :/ I've fixed that

from laravel-promocodes.

dayaki avatar dayaki commented on July 17, 2024

Whenever i try to save a code using Promocodes::save(5, 10.50), i keep getting SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '10.5' for key 'promocodes_code_unique' (SQL: insert intopromocodes(code) values (GT16-P8PBTF-CYY6W), (10.5), (GT16-ZNA410-TAJNN), (10.5), (GT16-U9NHAJ-ZUB4R), (10.5), (GT16-7DFYUF-9W5MX), (10.5), (GT16-38ATM9-KR3KM), (10.5)) error

from laravel-promocodes.

zgabievi avatar zgabievi commented on July 17, 2024

Here we go. I've tested some cases with tinker. Here is screenshot of this test:

image

Please, update to 0.1.4.

P.S. and update Promocode.php too

from laravel-promocodes.

dayaki avatar dayaki commented on July 17, 2024

Thanks, its working now, BUT you missed a] in line 144 of Promocodes.php. It is $data[$key['reward'] = $reward; instead of $data[$key]['reward'] = $reward;

from laravel-promocodes.

zgabievi avatar zgabievi commented on July 17, 2024

Fixed, thanks. I'm so bad today :D I will close issue for now. ;)

from laravel-promocodes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.