Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help for NOOB: working in a different directory


msl_007

Recommended Posts

Hey guys.

 

I'm new to the E-commerce scene. Trying to help my wife with her business. Anyway, I'm a little overwhelmed with all the various files and folders. This is a really huge program ... or maybe I'm just use to working on smaller projects. I do have a little experience programming (not much, though). I'm guessing this is PHP that we are using since the files end in PHP.

 

So, if anyone has any suggestions for some online tutorials which may help me with the basics as well as more intermediate stuff (and heaven forbid ... advanced stuff) ... if for no other reason that to help me follow these forums a little more.

 

However, I do have something right now that is bugging me. My wife doesn't want the customer to be in the Catalog for very long. We would like to have a "Products" page or section of pages on our main site. I would like to have an "Add to Cart" button (and perhaps some other features) as part of the main site ... outside the installation of osCommerce. After they click on the button, they are sent directly to the shopping cart.

 

I found THIS THREAD which featured some code that I thought would work for my problem. Here's the code that I ended up using, which doesn't work.

 

<form name="cart_add" action='<? 
$link_carrito= "product_info.php?action=add_product&products_id=96";
echo tep_href_link($link_carrito,$osCsid);?>' method="POST">

<input type="hidden" name="id[36]" value="69">
<input type="hidden" name="products_id" value="96">
<a href="java script:document.cart_add.submit();" target="_self" >Add to cart</a> 
</form>

 

I changed the product ID and removed the extra attributes that I'm not using. It didn't work. I then realised that I was working in a seperate directory, so I changed the $link_carrito to show the folder change. That didn't work, either. After reading THIS THREAD I removed the space between java and script. Here's what my code looks like right now. Do I need to change the directory for the javascript? If so, how?

 

<form name="cart_add" action='<? 
$link_carrito= "http://www.elegantlather.com/cart/product_info.php?action=add_product&products_id=29";
echo tep_href_link($link_carrito,$osCsid);?>' method="POST">

<a href="java script:document.cart_add.submit();" target="_self" >Add to cart</a> 
</form>

Link to comment
Share on other sites

After hours of searching, I have found a solution.

 

On THIS THREAD is a PHP utility you can download. It allows an "Add to Cart" button anywhere.

 

There are answers here, but it's a needle in a haystack finding them. Whew!

 

Mark

Link to comment
Share on other sites

there is a great wealth of knowledge on this site, but you are right.. sometimes it is hard to find. I find that using the google site search (type site:www.oscommerce.com/forums and then key words) it is A LOT easier to find things.. Also, searching under the Solutions->Documentation there is a knowledge base with some basic info on how to change the basic oscommerce site around.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...