Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Basics for Design V2.3+


toyicebear

Recommended Posts

 

 

Really thanks!!! I got it.

 

In case I want the photo also an url

 

which code should I insert to it?

 

Thx again!

 

There is a very helpful site here. http://www.w3schools.com/ Click the html tag and have a look around. It will help you enormously.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

  • Replies 177
  • Created
  • Last Reply

Really thanks!!! I got it.

 

In case I want the photo also an url

 

which code should I insert to it?

 

Thx again!

 

Hello @@raydata,

 

Have a look at this coding example you can find in index.php line 73:

<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>'; ?>

 

FILENAME_DEFAULT is the file you wants to link to, filename definitions you'll find in catalog/includes/filenames.php

or put the real filename between apostrophs ('my_file.php')

$cPath_new is an optional html parameter.

 

regards

Rainer

Link to comment
Share on other sites

Hello @@raydata,

 

Have a look at this coding example you can find in index.php line 73:

<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>'; ?>

 

FILENAME_DEFAULT is the file you wants to link to, filename definitions you'll find in catalog/includes/filenames.php

or put the real filename between apostrophs ('my_file.php')

$cPath_new is an optional html parameter.

 

regards

Rainer

 

1. Thanks again! Rainer. I means actually an url link to external web, when buyer click the "photo" then go.

 

2. Would you be kind enough to teach me, in each product info page, put the "text description" under the photo

instead of on the left. Which code should I change in product_info.php?

Link to comment
Share on other sites

1. Thanks again! Rainer. I means actually an url link to external web, when buyer click the "photo" then go.

 

2. Would you be kind enough to teach me, in each product info page, put the "text description" under the photo

instead of on the left. Which code should I change in product_info.php?

 

 

Hello @@raydata,

 

1. For an external link you need to use the normal html code:

 

<?php echo '<a href="http://www.urltolinkto.com">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>'; ?>

 

2. in product_info.php line 76:

   <div id="piGal" style="float: right;">

remove the float tag:

   <div id="piGal">

 

More resources for php functions etc. you'll find here:

http://www.php.net/manual/en/index.php

Link to comment
Share on other sites

Hi,

 

Does anyone know if it's possible to make the shopping cart box appear only if a customer has an item(s) in their cart?

 

Thank you in advance

:)

 

Hello @@artstyle,

 

In includes/modules/boxes/bm_shopping_cart.php

line 21 :

   function bm_shopping_cart() {

 

add below:

  global $cart;

 

line 25:

  if ( defined('MODULE_BOXES_SHOPPING_CART_STATUS') ) {

 

replace with:

  if ( defined('MODULE_BOXES_SHOPPING_CART_STATUS') && ($cart->count_contents() > 0) ) {

Link to comment
Share on other sites

Hi @@raiwa,

Thank you very much for your reply. it worked very well.

I'm trying to keep boxes neat. I also have the wishlist contribution. Do you know how to make it appear only is a customer has items in their list?

Thanks again for your help. :)

 

Part of bm_wishlist file is like this:

 

function bm_wishlist() {

$this->title = MODULE_BOXES_WISHLIST_TITLE;

$this->description = MODULE_BOXES_WISHLIST_DESCRIPTION;

 

if ( defined('MODULE_BOXES_WISHLIST_STATUS') ) {

$this->sort_order = MODULE_BOXES_WISHLIST_SORT_ORDER;

$this->enabled = (MODULE_BOXES_WISHLIST_STATUS == 'True') ;

 

$this->group = ((MODULE_BOXES_WISHLIST_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right');

}

}

 

function execute() {

global $wishList, $currencies, $languages_id, $oscTemplate;

 

if (is_array($wishList->wishID) && !empty($wishList->wishID)) {

reset($wishList->wishID);

$counter = count($wishList->wishID);

$wishlist_box = '';

if ($counter <= MAX_DISPLAY_WISHLIST_BOX) {

$wishlist_box = '<ul style="list-style:inside disc; padding: 0px;">';

Link to comment
Share on other sites

Hi,

I played around with it and changed the two lines just like shoppin cart file.

I did this and it worked. I hope the code is correct as I am not a coder. :)

 

function bm_wishlist() {

global $wishList;

 

$this->enabled = (MODULE_BOXES_WISHLIST_STATUS == 'True') && ($wishList->count_wishlist() != '0') ;

Link to comment
Share on other sites

Hi,

I played around with it and changed the two lines just like shoppin cart file.

I did this and it worked. I hope the code is correct as I am not a coder. :)

 

function bm_wishlist() {

global $wishList;

 

$this->enabled = (MODULE_BOXES_WISHLIST_STATUS == 'True') && ($wishList->count_wishlist() != '0') ;

 

@@artstyle Perfect!You got it :thumbsup:

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

I installed this addon.

Can you please help me find which file to edit so I don't get a table heading Product name, Buy now, Price, weight above the product listings.

I thought it was in the admin panel under configuration, product listing.

However, if I do it there then the column heading goes away but it also removes it from the product listing as well. I would like for them to show under the product image.

Is it possible to do this?

 

Thank you

Link to comment
Share on other sites

you will then have to edit this file: includes/modules/product_listing.php

Link to comment
Share on other sites

easy way......

 

change:

$prod_list_contents .= ' <div class="ui-widget-content ui-corner-bottom productListTable">' .

' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingData">';

to:

$prod_list_contents = ' <div class="ui-widget infoBoxContainer"><div class="ui-widget-content ui-corner-bottom productListTable">' .

' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingData">';

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

I recommend using the Firefox Element Inspect0r (right-click + Q). With you can easily find the files and lines necessary to change and you can play around with the values live.

 

 

^ prob useless comment though.

Link to comment
Share on other sites

  • 3 months later...
Posted · Hidden by burt, September 4, 2014 - x post
Hidden by burt, September 4, 2014 - x post

This is a big no-no, I know, but I'm posting this twice in two different places on the forum ... forgive me.

 

I implemented a fluid CCS for the 960gs in 2.3.4 from here:

http://grids.heroku.com/  as defined by this article:

http://multimixer.gr...commerce-store/

 

I used a 24 column, 30 column width 960 grid CCS.  I've tried playing with the width parameter in the CCS file - 92%, 96%, etc. and also changing margin-left/margin-right from 4% to "auto."  Yet, no matter what I do, the login form input fields in the "Returning Customer" column(s) overlaps the text in the "New Customer" column(s).  I even have to stretch the window far beyond a 960-pixel width to move the input fields away from overlapping the "New Customer" text.

 

The fluidity seems to work fine for everything but this.  Any ideas (please)?

Link to comment
  • 2 months later...

Hello,

 

I want to put the best sellers module on the front page. Can anyone direct me to an add-on or a topic in the forum? I've tried searching the forums and also tried using the also purchased module as a template. No success.

 

Thanks for any help.

Link to comment
Share on other sites

You'd probably be better of using the new_products module as your "template".

 

You can also have a look at, http://addons.oscommerce.com/info/7626

 

its easy to extend with new modules.

Link to comment
Share on other sites

There is a best sellers box, if I'm not mistaken. Just look at the code of it and try to combine that using the new products or modular front page module as Nick said.

I guess just use the database query from it and then add the code for the visual part.

Link to comment
Share on other sites

Thanks for the replies @@toyicebear and @@Tsimi.

 

I did run across the Modular front page in the past but didn't remember anything about best sellers so I moved passed it when I saw it again. Now that you guys confirm there's something I can work with I'll take a closer look.

 

I'm a lot better at installing mods than building them. Lol

 

Thanks for your time and assistance.

Link to comment
Share on other sites

  • 3 months later...

you could restructure the coding and have the background on a section starting below the header or you could simply add a background/background color to the header section.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...