Hi there,

I have been working on the same functionality, since I was moving and
upgrading my spree's version from 0.50.2 to 1.3.0, I considered to
move this functionality from my app as a plug-in, looks like a good timing.
Here is the link to plug-in: https://github.com/suryart/spree_active_sale

Let me know if you're missing anything here? So, I can improve this plug-in
to serve better.
On Thu, Jan 17, 2013 at 10:36 AM, wrote:

Hello, thanks for reading.

Would it be relatively painless to modify Spree in a way that is
architected towards daily deals? E.g, a new deal every day, or within a
specific time range?

Has anyone done this?

--



--

Please consider the environment before printing this email.

Regards,
Surya

--

Search Discussions

  • Arachnd at Jan 22, 2013 at 12:02 am
    Jet you're probably right with everything you're saying except about using
    cron/whenever.

    Absolutely not. You should not have to use whenever to describe when
    something will be published. That's a simple DB query. If any products
    match being live at this very moment then show it. Otherwise don't. That's
    all the logic and that has nothing to do with whenever.

    Surya, I'll investigate your library and I'll provide feedback like Jet to
    see if I run into anything of issue.
    On Monday, January 21, 2013 3:21:24 PM UTC-8, Jet wrote:

    Testing with Spree 1.3.2-stable:

    It appears your documentation needs to be updated:

    rake spree_active_sale:install
    rake aborted!
    Don't know how to build task 'spree_active_sale:install'

    Doing a rake -T yields:

    rake spree:active_sale:create

    But:

    rake spree:active_sale:create
    rake aborted!
    cannot load such file --
    /home/jet/RailsApps/spree/spree_active_sale/lib/tasks/../../db/default/users.rb
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
    `require'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
    `require'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in
    `block in require'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in
    `load_dependency'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in
    `require'
    /home/jet/RailsApps/spree/spree_active_sale/lib/tasks/spree_active_sale.rake:5:in
    `block (3 levels) in <top (required)>'
    Tasks: TOP => spree:active_sale:create

    ...some problem there yet.

    In your documentation it does not mention an active sale in the admin, is
    this just driven by the console?

    Are you creating an observer to monitor when an event will be fired?.

    If you really can use this to set up a sale for a number of products,
    schedule them in the future, for a specified
    number of hours it would be pretty nifty.

    From your documentation:



    - Provide an admin interface for creating/ scheduling, managing, or
    re-scheduling sales.

    The above, which is missing from your extension , is exactly why I have
    recommended the use of 'whenever'. You don't

    have to re-invent the wheel to schedule multiple saved sales being run at
    specific times. You currently

    do not have the functionality that was inquired about for a 'daily deal',
    or in least what I envision would be a real

    world implementation where you have the flexibility to create multiple
    'deals/promotions' and have them in the can,

    and they will just fire off at the appropriate 'TIME" , and time is what
    cron and 'whenever' are all about.
    <https://github.com/bluehandtalking/spree_active_sale#testing>
    Jet

    On Sunday, January 20, 2013 11:55:08 PM UTC-8, Surya wrote:

    Hi there,

    I have been working on the same functionality, since I was moving and
    upgrading my spree's version from 0.50.2 to 1.3.0, I considered to
    move this functionality from my app as a plug-in, looks like a good timing.
    Here is the link to plug-in: https://github.com/suryart/spree_active_sale


    Let me know if you're missing anything here? So, I can improve this
    plug-in to serve better.
    On Thu, Jan 17, 2013 at 10:36 AM, wrote:

    Hello, thanks for reading.

    Would it be relatively painless to modify Spree in a way that is
    architected towards daily deals? E.g, a new deal every day, or within a
    specific time range?

    Has anyone done this?

    --



    --

    Please consider the environment before printing this email.

    Regards,
    Surya
    --
  • Allen W. at Jan 22, 2013 at 6:21 pm
    Surya,

    Are these in your latest updates:


        - Provide an admin interface for creating/ scheduling, managing, or
        re-scheduling sales.
        - Provide a timer hlper for showing the countdown to users.

    THanks
    On Tuesday, January 22, 2013 2:15:52 AM UTC-5, Surya wrote:

    Jet,

    Thanks for running a test on this. I've figured it out, now. And, it's
    been fixed. I have updated the documentation on github, too. Again, many
    thanks for pointing out these glitches.


    Also, whenever gem is for writing cron jobs for crontab. Suppose if you
    wanna make a sale live(i.e. show it to your customers on the website) on
    Monday at 8.30AM, how will you go about this? Start uploading the products
    and add them in a taxon exactly at 8.30AM in the morning? What if your
    background process dies for some weird reasons?

    My solution is very simple, just make a query in your controller: @events
    = Spree::ActiveSale::Event.live_active

    In your view, iterate through your @events to generate navigation for
    sale(which can be a single product or taxon/ a group of products) links:
    <div class="nav">
    <ul>
    @events.each do |event|
    <li> <%= link_to event.name, event.eventable %> </li> <%# or you can
    make use of "permalink" attribute in odd situations %>
    end
    </ul>
    </div>

    This will fetch all the sales you are running, and as time changes,
    scheduled sales will pop up automatically. Let me know if I am missing
    anything here? Thanks

    On Tue, Jan 22, 2013 at 4:51 AM, Jet <j...@whidbey.com <javascript:>>wrote:
    Testing with Spree 1.3.2-stable:

    It appears your documentation needs to be updated:

    rake spree_active_sale:install
    rake aborted!
    Don't know how to build task 'spree_active_sale:install'

    Doing a rake -T yields:

    rake spree:active_sale:create

    But:

    rake spree:active_sale:create
    rake aborted!
    cannot load such file --
    /home/jet/RailsApps/spree/spree_active_sale/lib/tasks/../../db/default/users.rb
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
    `require'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
    `require'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in
    `block in require'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in
    `load_dependency'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in
    `require'
    /home/jet/RailsApps/spree/spree_active_sale/lib/tasks/spree_active_sale.rake:5:in
    `block (3 levels) in <top (required)>'
    Tasks: TOP => spree:active_sale:create

    ...some problem there yet.

    In your documentation it does not mention an active sale in the admin, is
    this just driven by the console?

    Are you creating an observer to monitor when an event will be fired?.

    If you really can use this to set up a sale for a number of products,
    schedule them in the future, for a specified
    number of hours it would be pretty nifty.

    From your documentation:



    - Provide an admin interface for creating/ scheduling, managing, or
    re-scheduling sales.

    The above, which is missing from your extension , is exactly why I have
    recommended the use of 'whenever'. You don't

    have to re-invent the wheel to schedule multiple saved sales being run at
    specific times. You currently

    do not have the functionality that was inquired about for a 'daily deal',
    or in least what I envision would be a real

    world implementation where you have the flexibility to create multiple
    'deals/promotions' and have them in the can,

    and they will just fire off at the appropriate 'TIME" , and time is what
    cron and 'whenever' are all about.
    <https://github.com/bluehandtalking/spree_active_sale#testing>
    Jet


    On Sunday, January 20, 2013 11:55:08 PM UTC-8, Surya wrote:

    Hi there,

    I have been working on the same functionality, since I was moving and
    upgrading my spree's version from 0.50.2 to 1.3.0, I considered to
    move this functionality from my app as a plug-in, looks like a good timing.
    Here is the link to plug-in: https://github.com/**
    suryart/spree_active_sale <https://github.com/suryart/spree_active_sale>


    Let me know if you're missing anything here? So, I can improve this
    plug-in to serve better.
    On Thu, Jan 17, 2013 at 10:36 AM, wrote:

    Hello, thanks for reading.

    Would it be relatively painless to modify Spree in a way that is
    architected towards daily deals? E.g, a new deal every day, or within a
    specific time range?

    Has anyone done this?

    --



    --

    Please consider the environment before printing this email.

    Regards,
    Surya
    --



    --

    Please consider the environment before printing this email.

    Regards,
    Surya
    --
  • Allen W. at Jan 22, 2013 at 7:09 pm
    Thanks! I will try to check it out. Appreciate it!
    On Tuesday, January 22, 2013 2:02:58 PM UTC-5, Surya wrote:

    Yes.

    On Tue, Jan 22, 2013 at 11:51 PM, Allen W. <allen.w...@gmail.com<javascript:>
    wrote:
    Surya,

    Are these in your latest updates:


    - Provide an admin interface for creating/ scheduling, managing, or
    re-scheduling sales.
    - Provide a timer hlper for showing the countdown to users.

    THanks
    On Tuesday, January 22, 2013 2:15:52 AM UTC-5, Surya wrote:

    Jet,

    Thanks for running a test on this. I've figured it out, now. And, it's
    been fixed. I have updated the documentation on github, too. Again, many
    thanks for pointing out these glitches.


    Also, whenever gem is for writing cron jobs for crontab. Suppose if you
    wanna make a sale live(i.e. show it to your customers on the website) on
    Monday at 8.30AM, how will you go about this? Start uploading the products
    and add them in a taxon exactly at 8.30AM in the morning? What if your
    background process dies for some weird reasons?

    My solution is very simple, just make a query in your controller:
    @events = Spree::ActiveSale::Event.live_**active

    In your view, iterate through your @events to generate navigation for
    sale(which can be a single product or taxon/ a group of products) links:
    <div class="nav">
    <ul>
    @events.each do |event|
    <li> <%= link_to event.name, event.eventable %> </li> <%# or you can
    make use of "permalink" attribute in odd situations %>
    end
    </ul>
    </div>

    This will fetch all the sales you are running, and as time changes,
    scheduled sales will pop up automatically. Let me know if I am missing
    anything here? Thanks
    On Tue, Jan 22, 2013 at 4:51 AM, Jet wrote:

    Testing with Spree 1.3.2-stable:

    It appears your documentation needs to be updated:

    rake spree_active_sale:install
    rake aborted!
    Don't know how to build task 'spree_active_sale:install'

    Doing a rake -T yields:

    rake spree:active_sale:create

    But:

    rake spree:active_sale:create
    rake aborted!
    cannot load such file -- /home/jet/RailsApps/spree/**
    spree_active_sale/lib/tasks/..**/../db/default/users.rb
    /home/jet/.rvm/gems/ruby-1.9.**3-p194@spree-1.1.3/gems/**
    polyglot-0.3.3/lib/polyglot.**rb:63:in `require'
    /home/jet/.rvm/gems/ruby-1.9.**3-p194@spree-1.1.3/gems/**
    polyglot-0.3.3/lib/polyglot.**rb:63:in `require'
    /home/jet/.rvm/gems/ruby-1.9.**3-p194@spree-1.1.3/gems/**
    activesupport-3.2.9/lib/**active_support/dependencies.**rb:251:in
    `block in require'
    /home/jet/.rvm/gems/ruby-1.9.**3-p194@spree-1.1.3/gems/**
    activesupport-3.2.9/lib/**active_support/dependencies.**rb:236:in
    `load_dependency'
    /home/jet/.rvm/gems/ruby-1.9.**3-p194@spree-1.1.3/gems/**
    activesupport-3.2.9/lib/**active_support/dependencies.**rb:251:in
    `require'
    /home/jet/RailsApps/spree/**spree_active_sale/lib/tasks/**spree_active_sale.rake:5:in
    `block (3 levels) in <top (required)>'
    Tasks: TOP => spree:active_sale:create

    ...some problem there yet.

    In your documentation it does not mention an active sale in the admin,
    is this just driven by the console?

    Are you creating an observer to monitor when an event will be fired?.

    If you really can use this to set up a sale for a number of products,
    schedule them in the future, for a specified
    number of hours it would be pretty nifty.

    From your documentation:



    - Provide an admin interface for creating/ scheduling, managing, or
    re-scheduling sales.

    The above, which is missing from your extension , is exactly why I have
    recommended the use of 'whenever'. You don't

    have to re-invent the wheel to schedule multiple saved sales being run
    at specific times. You currently

    do not have the functionality that was inquired about for a 'daily
    deal', or in least what I envision would be a real

    world implementation where you have the flexibility to create multiple
    'deals/promotions' and have them in the can,

    and they will just fire off at the appropriate 'TIME" , and time is
    what cron and 'whenever' are all about.
    <https://github.com/bluehandtalking/spree_active_sale#testing>
    Jet


    On Sunday, January 20, 2013 11:55:08 PM UTC-8, Surya wrote:

    Hi there,

    I have been working on the same functionality, since I was moving and
    upgrading my spree's version from 0.50.2 to 1.3.0, I considered to
    move this functionality from my app as a plug-in, looks like a good timing.
    Here is the link to plug-in: https://github.com/**su**
    ryart/spree_active_sale <https://github.com/suryart/spree_active_sale>


    Let me know if you're missing anything here? So, I can improve this
    plug-in to serve better.
    On Thu, Jan 17, 2013 at 10:36 AM, wrote:

    Hello, thanks for reading.

    Would it be relatively painless to modify Spree in a way that is
    architected towards daily deals? E.g, a new deal every day, or within a
    specific time range?

    Has anyone done this?

    --



    --

    Please consider the environment before printing this email.

    Regards,
    Surya
    --



    --

    Please consider the environment before printing this email.

    Regards,
    Surya
    --



    --

    Please consider the environment before printing this email.

    Regards,
    Surya
    --
  • Raymond Médédé KPATCHAA at May 6, 2014 at 2:31 am
    Hi Surya
    I was just thinking how i could update your extension to feet with spree
    2.2.1 !
    I need this feature on a website and the extension is just pour the 1.3.x
    versions.
    Regards
    On Tuesday, January 22, 2013 7:02:58 PM UTC, Surya wrote:

    Yes.

    On Tue, Jan 22, 2013 at 11:51 PM, Allen W. <allen.w...@gmail.com<javascript:>
    wrote:
    Surya,

    Are these in your latest updates:


    - Provide an admin interface for creating/ scheduling, managing, or
    re-scheduling sales.
    - Provide a timer hlper for showing the countdown to users.

    THanks
    On Tuesday, January 22, 2013 2:15:52 AM UTC-5, Surya wrote:

    Jet,

    Thanks for running a test on this. I've figured it out, now. And, it's
    been fixed. I have updated the documentation on github, too. Again, many
    thanks for pointing out these glitches.


    Also, whenever gem is for writing cron jobs for crontab. Suppose if you
    wanna make a sale live(i.e. show it to your customers on the website) on
    Monday at 8.30AM, how will you go about this? Start uploading the products
    and add them in a taxon exactly at 8.30AM in the morning? What if your
    background process dies for some weird reasons?

    My solution is very simple, just make a query in your controller:
    @events = Spree::ActiveSale::Event.live_active

    In your view, iterate through your @events to generate navigation for
    sale(which can be a single product or taxon/ a group of products) links:
    <div class="nav">
    <ul>
    @events.each do |event|
    <li> <%= link_to event.name, event.eventable %> </li> <%# or you can
    make use of "permalink" attribute in odd situations %>
    end
    </ul>
    </div>

    This will fetch all the sales you are running, and as time changes,
    scheduled sales will pop up automatically. Let me know if I am missing
    anything here? Thanks
    On Tue, Jan 22, 2013 at 4:51 AM, Jet wrote:

    Testing with Spree 1.3.2-stable:

    It appears your documentation needs to be updated:

    rake spree_active_sale:install
    rake aborted!
    Don't know how to build task 'spree_active_sale:install'

    Doing a rake -T yields:

    rake spree:active_sale:create

    But:

    rake spree:active_sale:create
    rake aborted!
    cannot load such file -- /home/jet/RailsApps/spree/
    spree_active_sale/lib/tasks/../../db/default/users.rb
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/
    polyglot-0.3.3/lib/polyglot.rb:63:in `require'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/
    polyglot-0.3.3/lib/polyglot.rb:63:in `require'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/
    activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block
    in require'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/
    activesupport-3.2.9/lib/active_support/dependencies.rb:236:in
    `load_dependency'
    /home/jet/.rvm/gems/ruby-1.9.3-p194@spree-1.1.3/gems/
    activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
    /home/jet/RailsApps/spree/spree_active_sale/lib/tasks/spree_active_sale.rake:5:in
    `block (3 levels) in <top (required)>'
    Tasks: TOP => spree:active_sale:create

    ...some problem there yet.

    In your documentation it does not mention an active sale in the admin,
    is this just driven by the console?

    Are you creating an observer to monitor when an event will be fired?.

    If you really can use this to set up a sale for a number of products,
    schedule them in the future, for a specified
    number of hours it would be pretty nifty.

    From your documentation:



    - Provide an admin interface for creating/ scheduling, managing, or
    re-scheduling sales.

    The above, which is missing from your extension , is exactly why I have
    recommended the use of 'whenever'. You don't

    have to re-invent the wheel to schedule multiple saved sales being run
    at specific times. You currently

    do not have the functionality that was inquired about for a 'daily
    deal', or in least what I envision would be a real

    world implementation where you have the flexibility to create multiple
    'deals/promotions' and have them in the can,

    and they will just fire off at the appropriate 'TIME" , and time is
    what cron and 'whenever' are all about.
    <https://github.com/bluehandtalking/spree_active_sale#testing>
    Jet


    On Sunday, January 20, 2013 11:55:08 PM UTC-8, Surya wrote:

    Hi there,

    I have been working on the same functionality, since I was moving and
    upgrading my spree's version from 0.50.2 to 1.3.0, I considered to
    move this functionality from my app as a plug-in, looks like a good timing.
    Here is the link to plug-in: https://github.com/su
    ryart/spree_active_sale

    Let me know if you're missing anything here? So, I can improve this
    plug-in to serve better.
    On Thu, Jan 17, 2013 at 10:36 AM, wrote:

    Hello, thanks for reading.

    Would it be relatively painless to modify Spree in a way that is
    architected towards daily deals? E.g, a new deal every day, or within a
    specific time range?

    Has anyone done this?

    --



    --

    Please consider the environment before printing this email.

    Regards,
    Surya
    --



    --

    Please consider the environment before printing this email.

    Regards,
    Surya
    --



    --

    Please consider the environment before printing this email.

    Regards,
    Surya

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedJan 21, '13 at 7:55a
activeMay 6, '14 at 2:31a
posts5
users4
websitespreecommerce.com
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase