Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] Generic Box


kymation

Recommended Posts

Ok. Thank you for letting me know.

 

I was up through the night working on it just to get to this point.

 

I know nothing about Javascript and have no idea what to look for.

 

It is a shame osC does not have built in features allowing people to do basic things like 'add a box' or 'add a background image', etc. I can't afford to have monthly fees, but I would be willing to pay for an affordable 'out of the box' version that would make it easier for people like me that have no clue when it comes to coding.

 

Thanks again for your help, and have a good day!

Jewell

Edited by jeu4328
Link to comment
Share on other sites

osCommerce is designed to be a solid, secure shopping cart, with the understanding that you can add whatever features you want. The Addons section is there to provide all of those options. There may be something there that you can use.

 

There are also generic modules like this one that you can add your own code into. You found that marquee code somewhere and copied it in, so go find a Javascript version and do the same thing.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi, Jim:

 

I'm sorry to be a pain in the neck, but I have spent the entire day trying to figure out what I'm doing. I've done several searches for a Javascript scrolling banner generator to get the code I need. I have found something that I think might work, but I have no idea where the text should go within the code. I'm thinking I will want to replace 'Javascript scrolling text' with my own text, but when I try that, it doesn't work. Nothing shows up in the box. Do I need to add code somewhere else within a file someplace?

 

Would it be possible for you to please look at the code and tell me what part of it I need to delete, and what I need to change within the Generic Banner Box ... and where I should add my text? I see that there are instructions at the beginning of the code, but because I don't know what any of it means, I have no idea how to interpret the instructions. I apologize. It appears that I'm even more clueless when it comes to this than I am with html coding ... and I didn't think that was possible! :blush:

 

Below is the code that I found ... does it look as if it will work? I have a list of several items that I'd like to scroll up. Would I enter <br> after each one to insure they scroll one at a time?

 

I found the following code at http://www.quackit.com/javascript/codes/javascript_scroll.cfm

 

 

<!--

Note: Make sure you place the xbMarquee.js file into the same directory that you run your code from. If you do place it into a different directory, make sure you update src="xbMarquee.js" to reflect the new location. Also, you only need to download xbMarquee.js once (regardless of how many scrolling marquees you have on your page).

And thanks for visiting Quackit.com!

-->

<script type="text/javascript" src="/javascript/codes/xbMarquee.js"></script>

<script type="text/javascript">

<!--

//set the marquee parameters

function init() { up_marquee.start(); }

var up_marquee_Text = 'Javascript scrolling text';

var up_marquee_Direction = 'up';

var up_marquee_Contents='<span style="font-family:Comic Sans MS;font-size:12pt;white-space:nowrap;">' + up_marquee_Text + '</span>';

up_marquee = new xbMarquee('up_marquee', '100%', '90%', 6, 100, up_marquee_Direction, 'scroll', up_marquee_Contents);

window.setTimeout( init, 200);

-->

</script>

 

Thank you,

Jewell

Link to comment
Share on other sites

That should work. However, that's a lot of work to do to get something so simple. Since we already have jQuery to simplify things, this one looks like a better solution.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thanks, but my weekend involves converting an old osCommerce store to the latest version. It's the first one I built (in 2003!) so a bit of nostalgia here. I hope your weekend is more relaxing.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi, Jim:

 

Well, I looked at this and have no idea what to do with it. Surprise! ha!

 

Do I upload the gistfile.js to admin/ext/jquery ... or somewhere else?

 

I am not seeing any clear instructions on how to set this up. Is there anything else I need to do?

Do I need to add any particular code anywhere else?

Do I add code to the admin generic box in addition to my personalized text?

 

***Would it just be easier for me to use the code I provided in an earlier post?

If so, what parts of it need to be edited, and where would I add my text within the code?

Do any other changes need to be made to that text before I add it to the box in Admin/Modules/Boxes/Generic Box?

 

Any advice you can give would be greatly appreciated.

 

Please don't feel obligate to answer this until next week. I know you are busy busy busy with the big project you are working on this weekend! :thumbsup:

 

Thanks again for your help!

Jewell

Link to comment
Share on other sites

The gistfile.js is a jQuery extension, so putting it in admin/ext/jquery/ makes sense. You then need to add a line to your template_top.php similar to the one that calls the jQuery file itself. It depends on jQuery, so put the new line below the jQuery call.

 

For the rest, take a look at the examples page on that site. Find the one that looks like you want, then copy the code for it from View Source in your browser. It will be very short, just one line starting with <marquee.... Paste that code in the generic box and you should have a marquee. Once you get everything working, change the text to your liking.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi, Jim:

 

Thank you for the additional guidance. I've added gistfile1.js to the ext/jquery folder and I've added a line of code to template_top.php. I'm not sure if I added it correctly, or whether I added it to the right place within the file. The code now looks like this:

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2012 osCommerce

 

Released under the GNU General Public License

*/

 

$oscTemplate->buildBlocks();

 

if (!$oscTemplate->hasBlocks('boxes_column_left')) {

$oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());

}

 

if (!$oscTemplate->hasBlocks('boxes_column_right')) {

$oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());

}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />

<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />

<link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.22.css" />

<script type="text/javascript" src="ext/jquery/jquery-1.8.0.min.js"></script>

<script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.22.min.js"></script>

<script type="text/javascript" src="ext/jquery/gistfile1.js"></script>

 

<script type="text/javascript">

// fix jQuery 1.8.0 and jQuery UI 1.8.22 bug with dialog buttons; http://bugs.jqueryui.com/ticket/8484

if ( $.attrFn ) { $.attrFn.text = true; }

</script>

 

<?php

if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {

?>

<script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script>

<script type="text/javascript">

$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);

</script>

<?php

}

?>

 

<script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script>

<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />

<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>

<link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" />

<link rel="stylesheet" type="text/css" href="stylesheet.css" />

<?php echo $oscTemplate->getBlocks('header_tags'); ?>

</head>

<body>

 

<div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?>">

 

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

 

<div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">

 

I pasted the code into the Generic Box and I did get a scroll effect. However, when it scrolls it is including the ' Best Sellers' box, the 'Information' box and also the 'Footer' image in the scroll action. (All of those boxes are located below the Generic Box in the right column of my website) I'm not sure why they are scrolling along with what I want to have scroll. I'm thinking I must have either added incorrect code or added it to the wrong place within the file. I placed it in what seemed to be the most logical location ... but that doesn't mean a thing since I don't understand what the code means. :blush: <<embarrassing but true>>>

 

Do you have any ideas as to how I can correct this problem?

 

As I said before, please don't feel obligated to respond right away if you are in the middle of your conversion project. For now I have entered text in the box and I don't mind keeping it there until you have a chance to respond.

 

Thank you,

Jewell :)

Link to comment
Share on other sites

I'm afraid using the javascript instead of html code hasn't made any difference.

I'm still having the same issues with the rotating banner not working as it should in Chrome. It doesn't complete the cycle and jumps back to the beginning.

 

At this point I guess I'll just leave the box 'as is' and use it for text only ... not as a rotating banner at this time.

 

I've been contacted by one of my customers stating the following: "I did find your website frustrating. When at the bottom of the screen, and there are options available for more pages, the website would not let me choose the next page and wouldn’t open it….so there are lots of designs I haven’t seen yet. I spent about 1.5 hours on your site and the longer I stayed the slower the site became, so finally I just closed the site without purchasing. Finally, the website would not let me add to the cart any new designs. Hope this helps."

 

I am going to post my customer comment in a new thread, but I wanted to let you know that I really appreciate your help with this issue! I will address the 'rotating banner' problem at a later time.

 

At this point I need to focus on making my website less frustrating for my customers. :(

 

Thanks again!

Jewell

Link to comment
Share on other sites

Hi jewell

 

first thing I see is your site is now asking for a password to access the front end this is probably something wrong in your /includes/configure.php you must have changed something although it could also be a password protect in your control panel was not there last week ??

 

Regards

Joli

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

OH NO!!! (w00t)I have no idea what caused that. I did not add anything intentionally that would cause this problem. <<sigh>> I have not made any changes the includes/configure.php file ... the last modified date is July 13 ... which is I believe around the time I installed the new version of osC.

 

How would I make that Password change in Control Panel ... or better yet, do you have any idea what I might have done to make that change? Perhaps I did so without knowing ... because I'm really smart that way! :blush:

 

Thank you for letting me know! :(

Jewell

Edited by jeu4328
Link to comment
Share on other sites

well would narrow down to the x 2 configure.php files and or the x 2 htacess files unlikely if you can not remember making a password protection from your control panel but strangely enough that what it looks like to me it is not a major problem just something small that you have probably changed so check first the control panel you should see something there about password protecting directory's see if anything is in there first.

regards

Joli

 

PS : That was probably what was annoying your customer.

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Thank you, John: I appreciate that feedback.

 

I checked in my control panel, and it appears that I do have two folders protected. They are:

shop/admin

shop/download

 

Could that be what is causing the issue?

Should I unprotect both of them? And if so, will unprotecting my admin files leave my shop vulnerable?

 

Thank you,

Jewell

Link to comment
Share on other sites

I checked both configure.php files. They both have the same original date.

 

All htaccess.php files that I could find have original date, except for two of them (they were changed today). And that is I believe because of changes I made after reading your post.

 

I had gone into my Admin application and under Administrators I deleted the password protection. However, because I was concerned about leaving the Admin account vulnerable, I went back in and changed it back to protected.

 

After doing that I checked in CPanel/Security/Password Protect Directories and that is when I found the two files were protected. I then unprotected the shop/download file.

 

There is now only one folder protected. It is the shop/admin file.

 

Those two files now read as follows:

 

shop/admin/htaccess.php code is:

# $Id$

#

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

#<IfModule mod_setenvif.c>

# <IfDefine SSL>

# SetEnvIf User-Agent ".*MSIE.*" \

# nokeepalive ssl-unclean-shutdown \

# downgrade-1.0 force-response-1.0

# </IfDefine>

#</IfModule>

 

# If Search Engine Friendly URLs do not work, try enabling the

# following Apache configuration parameter

 

# AcceptPathInfo On

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

 

# php_value session.use_trans_sid 0

# php_value register_globals 1

 

##### OSCOMMERCE ADMIN PROTECTION - BEGIN #####

AuthType Basic

AuthName "osCommerce Online Merchant Administration Tool"

Require valid-user

##### OSCOMMERCE ADMIN PROTECTION - END #####

AuthUserFile "/home4/jeu4328/.htpasswds/public_html/shop/admin/passwd"

 

shop/download/htaccess.php code is:

 

 

AuthName "No access"

AuthUserFile .htnopasswd

 

Do those files look as if they are now correct? I'm not sure what to look for.

 

Thank you,

Jewell

Edited by jeu4328
Link to comment
Share on other sites

Well it is recommended that you protect the admin and more important rename the admin folder itself that is the best protection but this does not normally affect the front end of the shop.

 

Now really not sure about your downloads normally the link first appears after successful payment and the customer is logged in so will pass that one on to someone else with more experience of digital downloads ?

 

Try simply unprotecting you can always change back when we find the bug

 

Specifiably what is happening is when we go to http://www.jewellsembroidery.com/ we get a redirect to http://www.jewellsembroidery.com/shop

and then hit the password protect ok you will have to check what is going on in

 

public_html/shop/.htaccess

 

why is it asking for a password??

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Yes, I added the re-direct because my old website is one that I had no idea how to change ... and I didn't like the look of it. So I want to bi-pass it and go directly to the shop. Is that a problem?

 

I'm not sure why it is asking for a password.

 

Can I remove that code to not require a password there?

Edited by jeu4328
Link to comment
Share on other sites

Try changing and placing the file in

<script type="/ext/jquery/gistfile1.js"></script>

 

Think you misunderstood What Jim said earlier about where to place this file

 

You will find it in shop/includes/template_top.php

Edited by joli1811
To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...