Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Want to eliminate Re-direct to store


jeu4328

Recommended Posts

Posted

Hello all:

 

I have a quick question that I hope someone can help me with ...

 

I have a website that was created by an IT person who no longer helps me.

 

I do not like the website, and prefer to only use my osC shop as my website, so I have added a 'Re-direct' command in cPanel to direct people to my shop when they enter http://jewellsembroidery.com ... it takes them to http://jewellsembroidery.com/shop/

 

I would like to delete my 'yucky' website and eliminate the need to do have the redirect because I have had times when the re-direct stops working and it takes customers to my 'yucky' website. I'd ultimately like to have my customers go directly to my shop without having the redirect ...

 

Can anyone tell me how to go about doing that?

 

Just a note: When I go into cPanel and try to delete the 'Re-direct', then enter my website url it still does a re-direct to my domain/shop ... instead of just going to my domain ... even though it says that no re-directs exist.

 

I hope I've explained this correctly.

 

Thank you,

Jewell

Posted

Frankly, the best way is to NOT do that. In the long run you're better off keeping each major application (e.g., the shop) in its own subdirectory (/shop). That way, in the future you are free to add more applications (forum, discussion group, blog, gallery, etc.) without fear that they're going to step on each other.

 

If the URL rewrite was done right, and your host isn't flaky, it should work consistently. It should be done in /.htaccess (assuming an Apache ("Linux") server):

RewriteEngine On
RewriteCond  %{REQUEST_URI}  !^/shop  [NC]
RewriteRule  ^(.*)$  /shop/$1  [L]

 

In the future, when you have other applications sharing the site, you create a landing page (/index.html) with links to all the applications, and remove the above rewrite code. Search engines and customer bookmarks will find all your shop pages in the same place.

Posted

Frankly, the best way is to NOT do that. In the long run you're better off keeping each major application (e.g., the shop) in its own subdirectory (/shop). That way, in the future you are free to add more applications (forum, discussion group, blog, gallery, etc.) without fear that they're going to step on each other.

 

If the URL rewrite was done right, and your host isn't flaky, it should work consistently. It should be done in /.htaccess (assuming an Apache ("Linux") server):

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/shop [NC]
RewriteRule ^(.*)$ /shop/$1 [L]

 

In the future, when you have other applications sharing the site, you create a landing page (/index.html) with links to all the applications, and remove the above rewrite code. Search engines and customer bookmarks will find all your shop pages in the same place.

 

Thank you, Phil :) I appreciate that information. So, are you saying I should not set the re-direct through the cPanel/Domains/Redirect? I should, instead, go into my catalog/.htaccess file and add that code? Is there a particular spot in the file where it should be placed? Or can I add it to the bottom?

 

After adding the code, should I remove it from cPanel/Domains/Redirect? If I do that, will that code prevent my 'yucky' web page come up?

 

Thank you so much!

Jewell

Posted

Is this "yucky" web page a real site, or just a hold? If there's no real content in there, you can add /index.html that does a redirect to your shop, as a backup to /.htaccess's redirect:

<html>
 <head>
   <title>Redirect to my store</title>
   <meta http-equiv="refresh" content="3; url=/shop"> 
 </head>
 <body>
   If you are not redirected to my shop within 3 seconds, <a href="/shop">click here</a>.
 </body>
</html>

 

I try to avoid cPanel redirects. They tend to screw things up. Remove any redirect that you already have and edit the /.htaccess. Put it either at the very top or very bottom, so that you don't accidentally put it in the middle of something else. I'm assuming that you don't have anything else in the way of rewrites and redirections in your existing /.htaccess.

Posted

Thank you, Phil. I appreciate your further instruction.

 

I have added the code to the end of my /.htaccess file.

 

Yes, it is an actual website that I've deleted everything except one page ... that is really ugly. :x I guess my next project will be to get THAT up to snuff so I can use it.

 

So I should still add the above code? Or since it is a real site should I not? If you think I should, what file would I add it to?

 

Thank you,

Jewell

Posted

Well, you could modify the /.htaccess code to let you get to the "yucky" page explicitly if you want to, while jumping everyone else to your store:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/shop [NC]
RewriteCond %{REQUEST_URI} !^/index.html [NC]
RewriteRule ^(.*)$ /shop/$1 [L]

assuming the yucky page is /index.html. You can go to that page by specifying /index.html in the URL.

 

A question that should be asked: if your store has been in /shop, does that mean that all your Google entries are for /shop/... and all your customer bookmarks are for /shop/... ? If so, this rewriting will preserve those bookmarks. On the other hand, if the old rewriting/redirection was such that Google and your customers think the store is in the root (/), this rewriting will break them all (which may not be so bad in the long run, but still could be inconvenient for a while). Note that this is the same problem (borked links and Google entries) you'll have if you move the store to the root.

 

Maybe, before you do anything (and none of this is irreversible, by the way), you should state exactly what the situation is now. Do your customers and Google see the store as being in / or in /shop (what kind of redirection or rewriting is done)? If someone types in just the domain name, do they magically end up in /shop? (when the rewrite is working!) Does their browser address bar show / or /shop once they're in the store? How important is it to preserve their bookmarks and to not make Google reindex the whole thing?

Posted

Well, I've modified my 'yucky' website to something less repulsive. :- It is just a temporary fix ... until I can find a template that I can 'tweak' to look like my osC shop. I have removed the 'redirect' from cPanel, and I just needed something as a place holder.

 

Phil, thank you so much again for your help. I really do appreciate it.

 

Does anyone know of a template program that I can use as a basic starting point that will allow me to easily modify it to the point where it has the same appearance as my osC shop?

My shop looks like this: http://jewellsembroidery.com/shop/

 

I've been looking for something on Wix.com, but I haven't found anything yet.

 

Any other suggestions?

 

Thank you so much,

Jewell :)

Posted

When you say "template program", do you mean a no-programming WYSIWYG way of creating a site? There are plenty of such editors, but none of them are going to automatically make use of osC's theming. It's going to take someone who knows HTML and scripting (e.g., PHP), CSS, the 960 Grid system, and maybe other stuff to get your site looking and acting like osC. It's not hard to take something produced by a WYSIWYG page editor and tweak the CSS to match the colors, font face, and font size of osC, but matching the layout takes much deeper knowledge.

Posted

Thank you, Phil: :)

 

I have no HTML training. I would need a WYSIWYG page editor that will allow me to tweak the CSS to match my website as closely as possible ... colors, background, etc.

I would like a site that would allow me to add photos, videos, photos of customer projects, what is in the works, etc.

Do you know of one that is more 'untrained user friendly' than others?

 

Jewell
Posted

Why not think about using the extra pages addon and ckeditor you can then link the pages from your info box or an extra navbar at the top keeping everything inside ocommerce template ?

 

Easier to maintain and no extra software needed.

 

Within the pages you can use tables and images to design a nice looking page

 

Regards

Joli

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

 

Posted

I will look at that, John. Thank you so much! :thumbsup: As you know ... I tend to have 'issues' when adding modules to my store. ha! I was hoping to avoid that. ha!

 

Where would I find the 'extra pages' add-on? I went to the 'Add Ons' section of the forum and typed in 'extra pages' but I am not seeing it there.

 

Will my customers be able to access these when typing in my domain name? Or will they need to add '/shop' at the end?

I'm trying to set it up so that my customers can find my site by typing in http://jewellsembroidery.com and not have to worry about re-directing.

 

Jewell

Posted

Will the ckeditor add-on work with osC 2.3.3? I haven't upgraded to 2.3.3.4

 

* update: I tried to download this add-on and received an error message. :(

Posted

Well the extra pages I was thinking about is

 

http://addons.oscommerce.com/info/1026

 

and the ckeditor is here

 

http://addons.oscommerce.com/info/7650 use the one from JohnAtYM it is the simplest

 

As regards .com versus .com/shop you have to decide if you are going to use third party software on your domain or not if you find all you need within oscommerce then easiest is to move your SHOP out of the shop folder to top level .

 

If you decide you need another software then best to keep in the shop folder as Mr Phil said

 

another great addon is an article manager

 

http://addons.oscommerce.com/info/1709 stick use the versions from Jack_mcs

 

All in all I think for your needs you can find everything within oscommerce but you will need to learn to change the code a bit (w00t)

 

PS: the ckeditor is super simple start with that.

 

Regards

John

 

PPS: if you install the extra pages let me know and I will give you a working admin/information_manager.php as a few of them were buggy.

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

 

Posted

Hi, John:

 

Could you please provide me with the working admin/information_manager.php? Thank you so much! :)

 

 

I've installed the Extra Pages add on ... and when I go into Admin and try to use the add on, I get this error:

 

Fatal error: Call to undefined function tep_draw_textarea_ckeditor() in ... catalog/admin/information_form.php on line 120

(I changed the location to protect my shop admin account name)

 

Can you give me guidance as to how to correct this problem?

The file code is as follows (I believe the text in blue is the code referred to above):

 

<?php
/*
Module: Information Pages Unlimited
	 File date: 2007/02/17
	 Based on the FAQ script of adgrafics
	 Adjusted by Joeri Stegeman (joeri210 at yahoo.com), The Netherlands
	 Modified by [email protected] for OSC v2.3.1[/size]
[size=4] osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com[/size]
[size=4] Released under the GNU General Public License
*/
?>
<tr>
 <td class="pageHeading"><?php echo $title; ?></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="2" width="100%">
<?php
 if (!strstr($info_group['locked'], 'visible')) {
?>
 <tr>
	 <td class="main"><?php echo ENTRY_STATUS; ?></td>
	 <td class="main"><?php echo tep_draw_radio_field('visible', '1', true, $edit['visible']) . '  ' . STATUS_ACTIVE . '  ' . tep_draw_radio_field('visible', '0', false, $edit['visible']) . '  ' . STATUS_INACTIVE; ?></td>
 </tr>
 <tr>
	 <td colspan="2" height="10"> </td>
 </tr>
<?php
 }[/size]
[size=4]	 if (!strstr($info_group['locked'], 'parent_id')) {
?>
 <tr>
	 <td class="main"><?php echo ENTRY_PARENT_PAGE; ?></td>
	 <td class="main">
<?php
	 if ((sizeof($data) > 0)) {
	 $options = '<option value="0">-</option>';
	 reset($data);
	 while (list($key, $val) = each($data)) {
		 $selected = ($val['information_id'] == $edit['parent_id']) ? 'selected="selected"' : '';
		 $options .= '<option value="' . $val['information_id'] . '" ' . $selected . '>' . $val['information_title'] . '</option>';
	 }
	 echo '<select name="parent_id">' . $options . '</select>';
	 } else {
	 echo '<span class="messageStackError">' . WARNING_PARENT_PAGE .'</span>';
	 }
?>
	 </td>
 </tr>
 <tr>
	 <td colspan="2" height="10"> </td>
 </tr>
<?php
 }[/size]
[size=4]	 if (!strstr($info_group['locked'], 'sort_order')) {
?>
 <tr>
	 <td class="main"><?php echo ENTRY_SORT_ORDER; ?></td>
	 <td><?php
		 if ($edit['sort_order']) {
		 $no = $edit['sort_order'];
		 }
		 echo tep_draw_input_field('sort_order', "$no", 'size=3 maxlength=4');
?>
	 </td>
 </tr>
 <tr>
	 <td colspan="2" height="10"> </td>
 </tr>
<?php
 }[/size]

[size=4]	 if (!strstr($info_group['locked'], 'information_description')) {
?>
<!-- tabs -->
 <tr>
 <td>
 <div id="tab_descrip" class="ui-tabs">
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
 <ul>
	 <?php
 //$languages = tep_get_languages();
		 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
	 ?>
 <li><a href="#<?php echo $languages[$i]['name'];?>"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?><?php echo " " . $languages[$i]['name'];?></a></li>
 <?php
 }
 ?>
 </ul>

<tr>
 <td>

<?php
 //$languages = tep_get_languages();
	 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
		 $languages_id=$languages[$i]['id'];	
	 ?>
	 <div id="<?php echo $languages[$i]['name'];?>" class="ui-tabs" >
		 <table border="0" cellspacing="0" cellpadding="2" align="left">
			 <tr>
				 <td>
 <table border="0" cellspacing="0" cellpadding="2">
				 <tr>
 <?php if (!strstr($info_group['locked'], 'information_title')) { ?>	
					 <td class="main"><?php echo ENTRY_TITLE ?></td>
					 <td align="left" class="main"><?php echo tep_draw_input_field('information_title[' . $languages[$i]['id'] . ']', (isset($information_title[$languages[$i]['id']]) ? stripslashes($edit[information_title]) : tep_get_information_entry($information_id, $languages[$i]['id'], 'information_title')), 'maxlength=255 size=75'); ?></td>
				 <?php } ?>	
				 </tr>	
				 <tr>
 <td class="main"><?php echo ENTRY_TEXT ; ?></td>
				 <td class="ui-widget-content">
				 [color=#0000ff]<?php[/color]
					 [color=#0000ff]echo tep_draw_textarea_ckeditor('information_description[' . $languages[$i]['id'] . ']', '', '140', '80', (isset($information_description[$languages[$i][/color]['id']]) ? stripslashes($edit[information_description]) : tep_get_information_entry($information_id, $languages[$i]['id'], 'information_description')));	
				 ?>
				 </td>	
				 </tr>
				 </table>
 </td>
			 </tr>	
	 </table>
 </div>
<?php
 }
?>
</td>
</tr>

</table>
</div>
</td>
</tr>

<!-- tabs -->
<?php[/size]
[size=4] }
?>[/size]
[size=4] <tr>
<td colspan="2" align="left"><br /><?php
 // Decide when to show the buttons (Determine or 'locked' is active)
 if ((empty($info_group['locked'])) || ($_GET['information_action'] == 'Edit')) {
 echo tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary');
 } else {
 echo tep_draw_button(IMAGE_INSERT, 'plus', null, 'primary');
 }
 echo tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_INFORMATION_MANAGER, 'gID=' . $gID));
?>
</td>
</tr>
<script>
<!-- bof sub tabs product description -->
$(function() {
$( "#tab_descrip" ).tabs( ) ;
});
</script>
<!-- eof tabs ui -->
</table>
</td>
</tr>
</form>

 

Thank you,

Jewell

Posted

Also ... after adding the Extra Pages add on all of my Information Pages were hidden, except for the 'Contact Me' page.

 

I believe it is because the of the code being changed in catalog/includes/modules/bm_information.php

 

I removed the // from the lines involving the Shipping and Conditions of Use pages ... however, I am still missing my About My Designs, Wholesale Inquiries and Copyright Statement pages.

 

Is there a reason this add on would have us hide the existing pages within the Information Box?

 

Thank you,

Jewell

Posted

Also ... after adding the Extra Pages add on all of my Information Pages were hidden, except for the 'Contact Me' page.

 

I believe it is because the of the code being changed in catalog/includes/modules/bm_information.php

 

I removed the // from the lines involving the Shipping and Conditions of Use pages ... however, I am still missing my About My Designs, Wholesale Inquiries and Copyright Statement pages.

 

Is there a reason this add on would have us hide the existing pages within the Information Box?

 

Thank you,

Jewell

 

Yes the addon takes over the function the pages are still there go to the php file directly with your browser and copy your text then insert it in the information manager

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

 

Posted

Yes the addon takes over the function the pages are still there go to the php file directly with your browser and copy your text then insert it in the information manager

 

I have to tell you, John ... I absolutely LOVE this add-on!!! It is fantastic!!!

Thank you so much for suggesting it!!! :D

Posted

 

and the ckeditor is here

 

http://addons.oscommerce.com/info/7650 use the one from JohnAtYM it is the simplest

 

 

John, the instructions for the ckeditor states "I wouldn't recommend using this on the catalog side as there is the possibility of leaving potentially unpatched attack vectors if you do not keep up to date with new releases of CKEditor."

 

What is meant by that? Is this something I should be concerned about?

 

Thank you,

Jewell

Posted

WOW!!! I just added ckeditor add-on ... LOVE IT!!! :D

 

Today is a GREAT day!!!

 

Thanks again! :lol:

Jewell

Posted

Well from the normal editor installed in admin there should be no problem as regards security did notice a security problem with the ckfinder ( which is a plug in for the ckeditor) so going to check the complete install again.

 

What you have should be ok as you do not have the image upload function yet !

 

Regards

John

 

PS: remember the best security is to change the name of your admin folder to something else easily done you just need to change the admin configure.php to reflect the new name .

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

 

Posted

Thank you, John: :) I've started adding the Articles Manager add-on, and I've hit a 'glitch'.

I'm not seeing some of the code I'm supposed to replace, so I've posted a plea for help on that forum page.

 

Thanks so much for your help and your suggestions!

 

Have a great weekend!

Jewell

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...