Old 27-01-2004, 17:15   #1 (permalink)
gray
i still want paying
 
gray's Avatar
 
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,728
eCommerce

just wondering what you all do when it comes to building an ecommerce site... would you customise a pre-built cart, or start from the ground up?

Seems like a lot of work to start from scratch, but are clients a bit wary of people who use pre-built carts?
  Reply With Quote
Old 28-01-2004, 03:34   #2 (permalink)
oli
Free Ring Ding™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 9,535
depends what the budget is, You can use oscommerce and completely modify every template on it, Or if the budgets a bit higher get something coded up.
__________________
..................
  Reply With Quote
Old 28-01-2004, 05:21   #3 (permalink)
lucidcreations
Part of the 3 out of 4
 
lucidcreations's Avatar
 
Join Date: Feb 2003
Location: cheshire
Posts: 2,081
Yeah like Oli say it depends on budget but if you want a cheap from end try this http://www.nopdesign.com/freecart/, you dont even need any server side scripts, although i through it all into a database at the end and send vars to Netbanx. All you need is to follow the brief instruction the code is really well commented and easy to follow.
__________________
Jase
  Reply With Quote
Old 28-01-2004, 05:23   #4 (permalink)
oli
Free Ring Ding™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 9,535
http://www.oscommerce.com is considered the best free cart, it accepts virtually any payment processor and has thousands of add ons for due to being open source.
__________________
..................
  Reply With Quote
Old 28-01-2004, 05:50   #5 (permalink)
lucidcreations
Part of the 3 out of 4
 
lucidcreations's Avatar
 
Join Date: Feb 2003
Location: cheshire
Posts: 2,081
hmm, never heard of osCommerce. Looks quite good, I'll have to check it out. Although I've never used PHP cos I'm a ASP / ASP.net person.
__________________
Jase
  Reply With Quote
Old 28-01-2004, 05:58   #6 (permalink)
oli
Free Ring Ding™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 9,535
This site belongs to a forum member :

http://www.winecharm.co.uk

One of the best examples of what can be done with the script.
__________________
..................
  Reply With Quote
Old 28-01-2004, 06:08   #7 (permalink)
lucidcreations
Part of the 3 out of 4
 
lucidcreations's Avatar
 
Join Date: Feb 2003
Location: cheshire
Posts: 2,081
You can do quite a bit then, is it all through an admin console and templates sort like this forum?
__________________
Jase
  Reply With Quote
Old 28-01-2004, 07:11   #8 (permalink)
oli
Free Ring Ding™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 9,535
yeah
__________________
..................
  Reply With Quote
Old 04-02-2004, 12:52   #9 (permalink)
ThePhilster
Registered User
 
Join Date: Jun 2003
Location: Belfast
Posts: 43
Quote:
Originally Posted by oli
This site belongs to a forum member :

http://www.winecharm.co.uk

One of the best examples of what can be done with the script.

Aww shucks, thanks Oli!!

osCommerce takes a wee bit of getting used to, and can be very frustrating at times trying to work out what page (and then which include file) to edit, but I like to think I managed to get away from the standard look and feel with the Wine Charm site. So I'd certainly recommend it to anyone!

If anyone wants some hints or tips, drop me a line and I'll be glad to help... if I can!!

Phil
  Reply With Quote
Old 04-02-2004, 14:29   #10 (permalink)
oli
Free Ring Ding™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 9,535
I could do with a couple of pointers if you don't mind; editing the side boxes ( cat listing, currency box etc) where are these located ?
Im sure theres more, but cant remember atm.
__________________
..................
  Reply With Quote
Old 04-02-2004, 18:43   #11 (permalink)
ThePhilster
Registered User
 
Join Date: Jun 2003
Location: Belfast
Posts: 43
Quote:
Originally Posted by oli
I could do with a couple of pointers if you don't mind; editing the side boxes ( cat listing, currency box etc) where are these located ?
Im sure theres more, but cant remember atm.

the cat listing boxes are located in includes->boxes->categories.php

But if you want to control how the table around this is displayed, you need to do this in the header.php file, as the categories.php deals with the display of the inner contents.

Is there anything specifically you wanna do with 'em?

OSCDox.com was a good use when I was setting the site up...

Phil

Last edited by ThePhilster : 04-02-2004 at 18:57.
  Reply With Quote
Old 05-02-2004, 03:35   #12 (permalink)
oli
Free Ring Ding™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 9,535
cheers for that Phil, I just wanted to change the look of them really.
__________________
..................
  Reply With Quote
Old 05-02-2004, 04:59   #13 (permalink)
ThePhilster
Registered User
 
Join Date: Jun 2003
Location: Belfast
Posts: 43
Quote:
Originally Posted by oli
cheers for that Phil, I just wanted to change the look of them really.

Just had a look at the new snapshot (MS2.2) files to check what I was saying was right... and it wasn't quite (almost a year now since I dug so deep into the code!!)

You'll need to look in column_left.php and column_right.php, as these are the include files that reference the individual components of the box. In here, you'll see reference to other include files, such as currencies.php or shopping_cart.php that are usually located in the boxes directory. So if you wanted to have the currencies on the left, instead of the right, copy-and-paste the relevant include line from column_right.php to coulumn_left.php. Or if you don't want them to display (which is what I chose to do) then just comment out the include line.

If you want to edit the appearance, you'll need to open the relevant file in the boxes directory. So, for example, this is original shopping_cart.php file (found in includes/boxes):

PHP Code:
<!-- shopping_cart //-->
<?php
  $info_box_contents 
= array();
  
$info_box_contents[] = array('align' => 'left',
                               
'text'  => BOX_HEADING_SHOPPING_CART
                            
);
  new 
infoBoxHeading($info_box_contentsfalsetruetep_href_link(FILENAME_SHOPPING_CART'''NONSSL'));

  
$cart_contents_string '';
  if (
$cart->count_contents() > 0) {
  
    
$cart_contents_string '<table border="1" width="116" cellspacing="0" cellpadding="0" align="center">';
    
$products $cart->get_products(); // $products[$i]['id'] .. $products[$i]['name'] .. $products[$i]['quantity']
    
for ($i=0$i<sizeof($products); $i++) {
      
$cart_contents_string .= '<tr><td class="products">&nbsp;&nbsp;';

      if ((
tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
        
$cart_contents_string .= '<span class="newItemInCart">'// highlight product quantity
      
} else {
        
$cart_contents_string .= '<span class="infoBoxContents">';
      }

      
$cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;</span>&nbsp;<span class="infoBoxContents"><a class="products" href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $products[$i]['id'], 'NONSSL') . '">';

      if ((
tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
        
$cart_contents_string .= '<span class="newItemInCart">'// highlight product name
      
} else {
        
$cart_contents_string .= '<span class="infoBoxContents">';
      }

      
$cart_contents_string .= $products[$i]['name'] . '</span></a></td></tr>';

      if ((
tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
        
tep_session_unregister('new_products_id_in_cart');
      }
    }
    
$cart_contents_string .= '</table>';
  } else {
    
$cart_empty 1;
    
$cart_contents_string .= BOX_SHOPPING_CART_EMPTY;
  }

  
$info_box_contents = array();
  
$info_box_contents[] = array('align' => 'left',
                               
'text'  => $cart_contents_string
                              
);

  if (!
$cart_empty) {
    
$info_box_contents[] = array('align' => 'left',
                                 
'text' => tep_draw_separator()
                           );
    
$info_box_contents[] = array('align' => 'right',
                                 
'text'  => $currencies->format($cart->show_total())
                                );
  }

  new 
infoBox($info_box_contents);
?>

<!-- shopping_cart_eof //-->

And this is what I did to it...


PHP Code:
<table width="120" border="0" cellpadding="0" cellspacing="0">
<tr> 
<td width="5"><img src="/images/table_top_left.gif" width="5" height="15"></td>
<td width="110"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART'''NONSSL'?>"><img src="/images/table_top_mybasket.gif" alt="My Basket" width="110" height="15" border="0"></a></td>
<td width="5"><img src="/images/table_top_right.gif" width="5" height="15"></td>
</tr>
<tr> 
<td width="5" background="/images/table_bg_left.gif">&nbsp;</td>
<td width="110" background="/images/table_bg.gif">
<? 
  $cart_contents_string 
''
  if (
$cart->count_contents() > 0) { 
    
$cart_contents_string '<table border="0" width="100%" cellspacing="0" cellpadding="0">'
    
$products $cart->get_products(); 
    for (
$i=0$n=sizeof($products); $i<$n$i++) { 
      
$cart_contents_string .= '<tr><td>'

      if ((
tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { 
        
$cart_contents_string .= '<span class="products"><strong>'
      } else { 
        
$cart_contents_string .= '<span class="products">'
      } 

      
$cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;</strong></span><a class="products" href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $products[$i]['id']) . '">'

      if ((
tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { 
        
$cart_contents_string .= '<span class="products"><strong>'
      } else { 
        
$cart_contents_string .= '<span>'
      } 

      
$cart_contents_string .= $products[$i]['name'] . '</span></strong></a></td></tr>'

      if ((
tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { 
        
tep_session_unregister('new_products_id_in_cart'); 
      } 
    } 
    
$cart_contents_string .= '</table>'
  } else { 
    
$cart_contents_string .= '<p align="center">' BOX_SHOPPING_CART_EMPTY '</p>'
  } 

  echo 
$cart_contents_string

  if (
$cart->count_contents() > 0) { 
    
//echo tep_draw_separator(); 
    
echo '<p class="products"><strong>Sub Total:</strong> ' $currencies->format($cart->show_total()) . '</p>'
  } 


?>
</td> 
<td width="5" background="/images/table_bg_right.gif">&nbsp;</td>
</tr>
<tr> 
<td width="5"><img src="/images/table_bottom_left.gif" width="5" height="5"></td>
<td width="110"><img src="/images/table_bottom_center.gif" width="110" height="5"></td>
<td width="5"><img src="/images/table_bottom_right.gif" width="5" height="5"></td>
</tr>
</table>
<!--My Basket Table Closed-->

I didn't want it to use the standard osCommerce table headings, so stripped out this line:

PHP Code:
new infoBoxHeading($info_box_contentsfalsetruetep_href_link(FILENAME_SHOPPING_CART'''NONSSL')); 

And then built a table around it. Similarly, by deleting this line,

PHP Code:
new infoBox($info_box_contents); 

you basically prevent the function that creates the table from working, and you simply complete the table off manually.

And that's how I went about editing the different components. Some parts are much trickier to modify than others, but once you get a grasp for how the logic works, it becomes a much less painless ordeal.

Hope that helps...

Phil

PS My code is from the 2.1 milestone, so it may not be identical to any code you have, but the theory should (I'd guess) be the same...
  Reply With Quote
Old 05-02-2004, 05:02   #14 (permalink)
oli
Free Ring Ding™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 9,535
I was wondering if there was a standard template for all the boxes rather than editing each one. Oh well, cheers mate.
__________________
..................
  Reply With Quote
Old 05-02-2004, 05:13   #15 (permalink)
ThePhilster
Registered User
 
Join Date: Jun 2003
Location: Belfast
Posts: 43
Quote:
Originally Posted by oli
I was wondering if there was a standard template for all the boxes rather than editing each one. Oh well, cheers mate.

Well, there is... it's the

PHP Code:
new infoBoxHeading($info_box_contentsfalsetruetep_href_link(FILENAME_SHOPPING_CART'''NONSSL')); 

and

PHP Code:
new infoBox($info_box_contents); 

lines that actually create the box. So if you edit the new infoBox function that creates the boxes, then it'll work for all "infoBoxes" on the site... But I'm not overly clued up on how to do that, so the only thing I could suggest would be to look at the osCommerce forums, or www.oscdox.com...

Cheers
Phil
  Reply With Quote
Old 05-02-2004, 05:14   #16 (permalink)
oli
Free Ring Ding™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 9,535
ta m8, as I said , brain dead today. btw Have you ever posted on the oscommerce forum, like getting blood out of a stone bunch of wankers.
__________________
..................
  Reply With Quote
Old 05-02-2004, 05:22   #17 (permalink)
ThePhilster
Registered User
 
Join Date: Jun 2003
Location: Belfast
Posts: 43
Quote:
Originally Posted by oli
ta m8, as I said , brain dead today. btw Have you ever posted on the oscommerce forum, like getting blood out of a stone bunch of wankers.

I have done in the past, but you're right, they can be a bunch of ass munchers!! And some of them are VERY snotty when simple questions are asked, which I found irritating...

I don't claim to be an expert on osCommerce, but drop me a PM or email if you need any more hints/tips.

Phil
  Reply With Quote
Old 08-02-2004, 18:22   #18 (permalink)
LD100
Registered User
 
LD100's Avatar
 
Join Date: Feb 2004
Location: Kiev, Ukraine
Posts: 8
Send a message via ICQ to LD100 Send a message via MSN to LD100
Ooh, the freeware eCommerce systems (like all predefined software) aren't highly customizable(you can redefine templates, but troubles come when you're trying to bind the shop to the site(especialy, when it uses it's own CMS)... Sometimes the most simple and elegant way is building your own shopping system, especialy, when it's module for your CMS...
  Reply With Quote
Old 08-04-2004, 11:48   #19 (permalink)
decomplex
Blu.com.au
 
Join Date: Apr 2004
Location: Melbourne, Australia
Posts: 9
Hi,
I just wanted to say that OSCommerce is definetly the best OpenSource code for E-Commerce sites.

Any time learning to modify OSCommerce is a benefit for any web developer.

I would also agree with ThePhilster, since it is better to modify the files that he has indicated, rather than going for the template contributions that you can find at http://www.oscommerce.com .

Good luck with it.

;-)
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8