chrometweaks.org

Website iPage hosting service - Need Help!?

Click Here To View All Answers...


Quick question... Website iPage hosting service - Need Help!? Looking forward for any response. Another quick question... Hi,.

I have been trying to get a fix for my problem for over two months now and I'm hoping somebody will be able to put me out of my misery..

Basically, we run a modelling agency and use the cart system as a casting suite of sort. People 'shop' for models and then @checkout they give us their wish list..

What we want to do is prevent other companies stealing our 'stars'. I have been trying to protect the catalog, so that in order to view it you must first register and log in..

The short term fix I have been using is to set up an external password protection for the whole oscommerce site. When people log in they can access the full site..

This is very time consuming as in order to use the iPage site properly they must log in again. But before they can do that I have to manually input/register their data on OScommerce..

We are currently recieving over 200 password requests per day and I cant keep up with the demand..

There must be someway around this,.

Any help will be greatly appreciated..

Luke Dolan..

Comments (158)

Hmm... I need to find out myself. I don't know what is the right answer to your question. I'll do some Googling and get back to you if I bump into an decent answer. You should email the people at iPage as they probably could help you..

Comment #1

Will that integrate with osc though?.

Will the user be promted to log or register or just to log in?.

I dont want to make it too hard to use the site...

Comment #2

I haven't thought this all the way through, but you might incorporate a conditional test of "tep_session_is_registered('customer_id')" into the page loading of product_info.php..

If it evaluates as false (not logged in) then redirect to login.php else proceed with loading product_info.php..

I'm not sure where exactly you would need to put the conditional, but maybe that will give you a starting point..

Doing something like this, your viewers could see the home page and the categories, but they would have to log in to go to the "product" page...

Comment #3

Logging in a viewing the categories but not being able to view the images until logged in is exactly what I'm looking for..

How would you include a redirect to login.php.

Sorry but I'm trying to learn php and I'm very s l o w.

Thanks for your help, once I get this the iPage site is ready to go live.

Cheers,.

Luke..

Comment #4

Ok, I gave it a quick go and worked it out. It just has one caveat, after they login they will be on the homepage rather than back at the "product" page. But once logged in, they can navigate freely in the catalog..

First of all - backup your catalog, or at least the product_info.php file..

Open catalog/product_info.php.

After.

Require('includes/application_top.php');.

Insert:.

 if (!(tep_session_is_registered('customer_id'))) {.

        tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

       } else {.

Then at the very end of the file insert a } just before the last ?> so that it looks like this:.

<?php require(DIR_WS_INCLUDES'application_bottom.php');.

}.

?>.

That should do it, with just that one inconvenience of bouncing back to the home page. Perhaps someone else will know how to make the login return back to the appropriate product_info.php page afterwards..

Note: This assumes that you use SSL for the login. If not replace.

 if (!(tep_session_is_registered('customer_id'))) {.

        tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

       } else {.

With.

 if (!(tep_session_is_registered('customer_id'))) {.

        tep_redirect(tep_href_link(FILENAME_LOGIN));.

       } else {..

Comment #5

That is working, however...being a pain as ever. When you click on the category, then sub category a thumbnail appears of the image, when you click the image it then asks you to log in..

The only bit of code I can find that refers to that step refers to a c section as shown in the URL.

/catalog/index.php?cPath=21_24.

Is it possible to make the protection kick in one stage before, so that you cannot see any images or is it possible to set a default image for all picyures such as 'click here to view'.

Then when they are logged in they can view the remainder of the pictures (would a slideshow contrib work??.

Really appreciate your help.......its getting closer I can almost smell it!!.

Luke..

Comment #6

I have just come across a different way of ensuring the images are not viewed, I put the protection in the index file..

It make you log in before viewing most things, but still lets you view stuff in the info box and search box. I will have to protect the search function also..

All I need do now is have a greeting page on the main iPage site which then directs you to the catalog and bobs your uncle..

Not the ideal way as id like to find the middle ground between both solotions, however this is acceptable and the better option of the two..

Many thanks for all your help and if you do come across how to do exactly what I want then please let me know..

Cheers,.

Luke..

Comment #7

Just come across this proble after registration. Seems to be some sort of problem with recognizing the user.

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /catalog/includes/functions/database.php:13) in /catalog/includes/functions/database.php on line 13.

Any ideas??..

Comment #8

Does anybody have any ideas on how to correct this error??..

Comment #9

It will be necessary to know what changes were made to the index.php file in order for anyone to be able to offer advice on that. It appears that something about the code change is causing it to try to connect to the database after it has already been done..

The index.php file is more complex because it does double duty, generating the home page and the categories. Modifying it with the login requirement code could be a bit more complicated..

Relating back to my original suggestion. It should only prompt for login the first time that they click on a "product" whether category or subcategory. Once they are logged in, they should be able to browse freely. This seems like it would be a fairly clean approach..

Also, by putting the protection on the product page, it doesn't matter how they get to the product, they will have to log in..

If you put the protection on anything prior to that (i.e index.php), and they link stratight in to the product (i.e. from a search engiine), there will be no restriction. They wouldn't be able to browse freely, but they would have full access to the product page they landed on. And once they noticed the structure of the URL, they could likely access other product pages by trial and error...

Comment #10

The only problem with the product_info page is that it allows you to view the thumbnail of the image, alot of the parents for the child models that we have are uncomfotable with this type of access. Im trying to keep them happy but also make it easy for casting directors to use the site..

Is there anyway to remove the thumbnail image, or replace the thumbnails with a click to view image?.

The changes that were made the the index.php file were eactly the same as the product_info page.

Namely: at top of page prior to HTML bits..

***********************************************************.

Released under the GNU General Public License.

*/.

Require('includes/application_top.php');.

If (!(tep_session_is_registered('customer_id'))) {.

Tep_redirect(tep_href_link(FILENAME_LOGIN));.

} else {.

Require('includes/application_top.php');.

// the following cPath references come from application_top.php.

$category_depth = 'top';.

If (isset($cPath) && tep_not_null($cPath)) {.

$categories_products_query = tep_db_query("select count(*) as total from "TABLE_PRODUCTS_TO_CATEGORIES" where categories_id = '"(int)$current_category_id"'");.

$cateqories_products = tep_db_fetch_array($categories_products_query);.

If ($cateqories_products['total'] > 0) {.

$category_depth = 'products'; // display products.

} else {.

$category_parent_query = tep_db_query("select count(*) as total from "TABLE_CATEGORIES" where parent_id = '"(int)$current_category_id"'");.

$category_parent = tep_db_fetch_array($category_parent_query);.

If ($category_parent['total'] > 0) {.

$category_depth = 'nested'; // navigate through the categories.

} else {.

$category_depth = 'products'; // category has no products, but display the 'no products' message.

}.

}.

}.

}.

Require(DIR_WS_LANGUAGES$language'/'FILENAME_DEFAULT);.

?>.

*************************************************************.

Any suggestions??..

Comment #11

You have.

Require('includes/application_top.php');.

Written twice in your code..

So the next question is how to make the Columns invisible until you login ...

Any ideas?..

Comment #12

It has something to do with the cpath attribute( I think) ive trying playing around with protecting that but I just end up with loads of errors...

Comment #13

I have managed to protect the whole of the index page. At the moment this is the best as I can manage. Unless I call discover how to prevent the cpath stuff showing I will have to use a main page which then links to the catalog...

Comment #14

I wanted to require the customer to log in but not have access to the menu items and prices. I simply added this code to the bottom of /boxes/categories.php just above $info_box_contents = array();.

If (!(tep_session_is_registered('customer_id'))) {.

$categories_string ='<br><b>To use the Estimator please log in. This will allow us to better serve you.</b><br><br>';.

}.

This message appears in the Categories box instead of the menu items. Everything else on the page remains the same, so they have access to the links and other information..

Http://mossycreekcatering.com/catalog.

Norm..

Comment #15

Hi,.

I have been trying to get a fix for my problem for over two months now and I'm hoping somebody will be able to put me out of my misery..

Basically, we run a modelling agency and use the cart system as a casting suite of sort. People 'shop' for models and then @checkout they give us their wish list..

What we want to do is prevent other companies stealing our 'stars'. I have been trying to protect the catalog, so that in order to view it you must first register and log in..

The short term fix I have been using is to set up an external password protection for the whole oscommerce site. When people log in they can access the full site..

This is very time consuming as in order to use the iPage site properly they must log in again. But before they can do that I have to manually input/register their data on OScommerce..

We are currently recieving over 200 password requests per day and I cant keep up with the demand..

There must be someway around this,.

Any help will be greatly appreciated..

Luke Dolan..

Comment #16

Password protect your Catelog directory or whatever directory you have osCommerce using .htaccess and .htpasswrd. Google ".htaccess generator password" for more info on how to do this..

You should be password protecting your admin directory like this in some fasion or another anyways..

This post has been edited by.

Fifthnail.

: 23 June 2004, 22:12..

Comment #17


This question was taken from a support group/message board and re-posted here so others can learn from it.