Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Location
    Rotherham, UK
    Posts
    143
    Plugin Contributions
    0

    Default Prob a bizarre question - sounds

    Hiya,
    i know this is probably a bit of a bizarre question, but the lady i am doing a site for has a candy shop in my village. She has one of those old fashioned bells on her door so when you walk into the shop thats the first thing you hear. She wants that sound to ring as you enter her online shop .. is this possible with a zen shop ?
    Many Thanks
    Erica xx

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Prob a bizarre question - sounds

    The topic of sounds on a webpage is a delicate thing. They can be very irritating if not tastefully implemented.

    You're looking for a case where you want it to appear only on the home page, most likely. And then probably only want it to sound "once" per visit. Or a combination of both ... it can sound on "any" page, but only once per visit. (You could get corny and have it sound on checkout-success too ... but that's stretching things.)

    To do something like this would require custom coding, and the support of cookies in the customers' browser:
    - on every page, the system checks for the cookie -- if set, skip playing the sound.
    - if none is set, or exists but is expired, then play the sound

    You could alternatively use PHP sessions to do a similar detection, which removes the cookie requirement, making your site more friendly to more security-conscious folks.

    To do this, I'd suggest something *like* this, which you'll have to refine to your needs:

    /includes/templates/YOURTEMPLATE/common/tpl_footer.php
    at the very bottom, you'd add the code, which would look something like this:
    Code:
    <?php
      if (!isset($_SESSION['play_welcome'])) {
        $_SESSION['play_welcome'] = 1;
    ?>
    .........insert HTML code to play the sound here .......
    <?php
      }
    ?>
    You'll need to research the most correct and cross-browser-compatible HTML code to use for playing the sound. Some browsers work well with an EMBED tag. Other browsers ignore those.

    Oh ... and be sure the sound isn't too loud or obnoxious when recording it. Otherwise you may wonder why folks don't stick around online.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2006
    Location
    Rotherham, UK
    Posts
    143
    Plugin Contributions
    0

    Default Re: Prob a bizarre question - sounds

    hiya DrByte, and thank you for the reply.
    I fully agree with you about the fact that people would leave because of annoying noise .. i know that i do lol .. if i enter a site (any kind of site, not just a shop) and it has music or sounds on actions etc, then i close the site down and mark it as one to never visit again .. but she has asked on more than one occasion for this, so i had to check. I will show her your reply tho, and explain that a lot of people will be turned off by it.
    Thanks again
    Erica xx

 

 

Similar Threads

  1. v139h Product download page blank - More fun than it sounds
    By SgtPepper in forum General Questions
    Replies: 6
    Last Post: 7 Nov 2012, 11:23 PM
  2. prob/question with attributes
    By cw3849 in forum General Questions
    Replies: 1
    Last Post: 26 May 2011, 08:29 AM
  3. Bizarre!!
    By limelites in forum General Questions
    Replies: 3
    Last Post: 25 Apr 2009, 09:21 AM
  4. ssl www and htaccess question/prob
    By Sckwooral in forum General Questions
    Replies: 1
    Last Post: 27 Jun 2008, 09:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg