osCommerce Espanol and Password problems…

Gerard asks;

1) I notice that during New Client Registration, the fields “Fax Number” contain my database name, and the “Password” field already contains a password – I don’t know which. How can I correct this problem?

This is a non-problem. I guess that you have asked your browser to “remember” some details – so all your browser is doing is adding incorrect details when you view that page. Anyone else will not see the same details.

2) In the Spanish “Bienvenido (Welcome) Email no client title “Señor” or “Señora” appears.
It also doesn’t differenciate between sex – The “Bienvenido” Email says for example: Estimado Larroza, For a woman that should be “Estimada” and of course in both cases the Señor or Señora should appear in the Email.

The way it is now it is very rude. Since my Website is mainly for Spanish speakers this is a major problem to me. Your advise would be greatly appreciated.

You will find this text in the file: /includes/languages/espanol/create_account.php – find:

[php]define(‘EMAIL_GREET_MR’, ‘Estimado ‘ . stripslashes($HTTP_POST_VARS[‘lastname’]) . ‘,’ . “\n\n”);
define(‘EMAIL_GREET_MS’, ‘Estimado ‘ . stripslashes($HTTP_POST_VARS[‘lastname’]) . ‘,’ . “\n\n”);
define(‘EMAIL_GREET_NONE’, ‘Estimado ‘ . stripslashes($HTTP_POST_VARS[‘firstname’]) . ‘,’ . “\n\n”);[/php]

and change them appropriately.

Easy as 123 🙂

STS Template To Buy?

JD asks;

First of all I wanted to thank you for the useful books you have made on your website.
I purchased already two of your applications for STS-OSC rc2 and package install for local host.

I wanted to ask you if you or someone you know could help me with creating a simple html layout for my OSC store. It’s been really hard to find someone who can make only that part of the whole OSC shopping cart. Let me know if you have anything in mind and what would be the cost (no flashes or anything complicated, just the frame, header, footer, main area, left/right colimn and colors).

Thank You!

I am pretty sure that there is nobody presently making STS templates for osCommerce. The demand for these would be so low that it would be uneconomical in my opinion – though I would love to be proved wrong!

As STS is not needed to make an outstanding design you might like to take a look at my makeover service – if that doesn’t float your boat, then yes I am happy to come up with a STS template – the cost would be about the same as my makeover service.

Cheers Gary

Local Collection from multiple pick up points

Peter asks;

We’d like to give our local customers the option of collecting their orders from ‘Collection Points’ that we’re setting up with local businesses.

The advantage is that the customers can save money on shipping for heavy/bulky products and help reduce our transportation carbon footprint by cutting back on the number of delivery vehicles on the road (this is important to us as we sell ecological and organic products cleanerway.com/store ).

I’ve tried the collection-in-person module http://addons.oscommerce.com/info/4633 but this failed to show up in the list of shipping options and only allows for a single collection point.

Any ideas suggestions would be much appriciated

My idea for this would be to create a shipping module into which the Store Owner can set up postcodes. These postcodes would be the ones that are near the multiple pick up points.

If your buyer’s postcode matches one of the postcodes inserted, then the “collection in person” module appears. Obviously if the postcodes do not match, it won’t!

If they then select the “collection in person” module, the checkout_success.php page will have their local depot address details, a map from google, the phone number and so on.

Seems to be a nice easy solution, that would take very little time to code up, hence would cost very little, certainly less than $100 for what I envisage should work nicely.

How do I freshen up my site?

Peer asks;

I have searched the forum without any luck.
Is it possible to insert images in the PHP pages?
I would like to fresh up my site with some images.

I have also looked at the carousel, but find it difficult to include

It certainly is pretty straightforward. You need to always bear in mind that PHP code is just a way of outputting HTML – so think of it as a normal html page…

The recent contribution “carousel” is one to avoid. As far as I recall, it needs 777 permissions on files to be able to work, and 777 on files is a recipe for disaster.

Freshening up a site is quite easy – Making a design work in osCommerce. Of course, I also offer an osCommerce Makeover service as well as selling two eBooks which show how to “design” in osCommerce.

All in allI think I made it fairly easy for anyone to get on with osCommerce – be it from the posts in this blog, to my eBooks, to me actually designing sites…I got it all going on!

Mashup “New Products for month”

The standard “new products for month” box on the front page of most osCommerce sites is a complete waste of time. It just shows the last “x” (usually 9) products that were added/amended. Useless!

Here’s a few ideas – open up /includes/modules/new_products.php

1. How about getting 9 RANDOM items to show? Easy.

Find this code;

[php]$new_products_query = tep_db_query(“select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from ” . TABLE_PRODUCTS . ” p left join ” . TABLE_SPECIALS . ” s on p.products_id = s.products_id, ” . TABLE_PRODUCTS_DESCRIPTION . ” pd where p.products_status = ‘1’ and p.products_id = pd.products_id and pd.language_id = ‘” . (int)$languages_id . “‘ order by p.products_date_added desc limit ” . MAX_DISPLAY_NEW_PRODUCTS);[/php]

Change it to this;

[php]$new_products_query = tep_db_query(“select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from ” . TABLE_PRODUCTS . ” p left join ” . TABLE_SPECIALS . ” s on p.products_id = s.products_id, ” . TABLE_PRODUCTS_DESCRIPTION . ” pd where p.products_status = ‘1’ and p.products_id = pd.products_id and pd.language_id = ‘” . (int)$languages_id . “‘ order by RAND() limit ” . MAX_DISPLAY_NEW_PRODUCTS);[/php]

No good? Ok, revert back to the original file…

2. How about only showing Special Offers, randomly?

Find this:

[php]$new_products_query = tep_db_query(“select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from ” . TABLE_PRODUCTS . ” p left join ” . TABLE_SPECIALS . ” s on p.products_id = s.products_id, ” . TABLE_PRODUCTS_DESCRIPTION . ” pd where p.products_status = ‘1’ and p.products_id = pd.products_id and pd.language_id = ‘” . (int)$languages_id . “‘ order by p.products_date_added desc limit ” . MAX_DISPLAY_NEW_PRODUCTS);[/php]

Change it to this:

[php]$new_products_query = tep_db_query(“select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_prix from ” . TABLE_PRODUCTS . ” p left join ” . TABLE_SPECIALS . ” s on p.products_id = s.products_id, ” . TABLE_PRODUCTS_DESCRIPTION . ” pd where p.products_status = ‘1’ and p.products_id = pd.products_id and pd.language_id = ‘” . (int)$languages_id . “‘ and s.status = ‘1’ order by RAND() limit ” . MAX_DISPLAY_NEW_PRODUCTS);[/php]

Find this:

[php]’text’ => ‘‘ . tep_image(DIR_WS_IMAGES . $new_products[‘products_image’], $new_products[‘products_name’], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . ‘
‘ . $new_products[‘products_name’] . ‘
‘ . $currencies->display_price($new_products[‘products_price’], tep_get_tax_rate($new_products[‘products_tax_class_id’])));[/php]

Change it to this:

[php]’text’ => ‘‘ . tep_image(DIR_WS_IMAGES . $new_products[‘products_image’], $new_products[‘products_name’], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . ‘
‘ . $new_products[‘products_name’] . ‘
‘ . $currencies->display_price($new_products[‘products_price’], tep_get_tax_rate($new_products[‘products_tax_class_id’])) . ‘ ‘ . $currencies->display_price($new_products[‘products_prix’], tep_get_tax_rate($new_products[‘products_tax_class_id’])) . ‘‘);[/php]

No good? OK, let’s revert back to the original file.

3. How about having the product name and price alongside the image?

Find this:

[php]’align’ => ‘center’,[/php]

Change it to this:

[php]’align’ => ‘left’,[/php]

Find this:

[php]’text’ => ‘‘ . tep_image(DIR_WS_IMAGES . $new_products[‘products_image’], $new_products[‘products_name’], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . ‘
‘ . $new_products[‘products_name’] . ‘
‘ . $currencies->display_price($new_products[‘products_price’], tep_get_tax_rate($new_products[‘products_tax_class_id’])));[/php]

Change it to this:

[php]’text’ => ‘‘ . tep_image(DIR_WS_IMAGES . $new_products[‘products_image’], $new_products[‘products_name’], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ‘align=”left”‘) . ‘‘ . $new_products[‘products_name’] . ‘
‘ . $currencies->display_price($new_products[‘products_price’], tep_get_tax_rate($new_products[‘products_tax_class_id’])));[/php]

Still Not Happy? OK, let’s mash the whole lot…

4. Make it Specials only, random order, with the price and name at the side of each

Find this:

[php]$new_products_query = tep_db_query(“select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from ” . TABLE_PRODUCTS . ” p left join ” . TABLE_SPECIALS . ” s on p.products_id = s.products_id, ” . TABLE_PRODUCTS_DESCRIPTION . ” pd where p.products_status = ‘1’ and p.products_id = pd.products_id and pd.language_id = ‘” . (int)$languages_id . “‘ order by p.products_date_added desc limit ” . MAX_DISPLAY_NEW_PRODUCTS);[/php]

Change it to this:

[php]$new_products_query = tep_db_query(“select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, if(s.status, s.specials_new_products_price, p.products_price) as products_prix from ” . TABLE_PRODUCTS . ” p left join ” . TABLE_SPECIALS . ” s on p.products_id = s.products_id where products_status = ‘1’ and s.status = ‘1’ order by RAND() desc limit ” . MAX_DISPLAY_NEW_PRODUCTS);[/php]

Find this:

[php]’align’ => ‘center’,[/php]

Change it to this:

[php]’align’ => ‘left’,[/php]

Find this:

[php]’text’ => ‘‘ . tep_image(DIR_WS_IMAGES . $new_products[‘products_image’], $new_products[‘products_name’], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . ‘
‘ . $new_products[‘products_name’] . ‘
‘ . $currencies->display_price($new_products[‘products_price’], tep_get_tax_rate($new_products[‘products_tax_class_id’])));[/php]

Change it to this:

[php]’text’ => ‘‘ . tep_image(DIR_WS_IMAGES . $new_products[‘products_image’], $new_products[‘products_name’], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ‘align=”left”‘) . ‘‘ . $new_products[‘products_name’] . ‘
‘ . $currencies->display_price($new_products[‘products_price’], tep_get_tax_rate($new_products[‘products_tax_class_id’])) . ‘ ‘ . $currencies->display_price($new_products[‘products_prix’], tep_get_tax_rate($new_products[‘products_tax_class_id’])) . ‘‘);[/php]

As you can see, it’s easily possible to amend the SQL to get what you need from the database and it is easy to amend the HTML to layout the info you got from the database.

osCommerce is easy as 123, eh?

Log In across many stores

Len asks;

I have set up several related stores with osc and wondered if there was a way so that customers signing in to any one of the stores could use those credentials at any other store. I was unable to find any contributions to handle this particular set-up. Any help would be appreciated 🙂

The only way that I can think to do this would be to have all the sites using the same database. Of course in reality that’s probably impossible as you will probably have different products in each store…

So, how about if (when a person creates an account) that account is created at ALL the stores? I think this should be possible – maybe with some form of XML/Soap input. But then you have some security implications.

I’m not too sure. IF any readers have an idea, please feel free to post!

Mash the Product Info Page

HOw many times have you seen an osCommerce store that has the same boring old layout for the product_info.php page? 100s of times, I bet.

Even some of the templates from Template Monster etc have only amended the larger picture rather than concentrating on smaller changes to individual pages.

Today, whilst I was doing one of my popular osCommerce makeovers, I decided to experiment a bit with a slightly different take on product_info.php – basically I wanted to put the buy button etc at the TOP of the description rather than at the bottom. My view is that it’s better to get the important stuff at the top of the page…

Anyway, here’s an image of what I came up with;

Basically, I moved the “price” information down below the product name. I also updated the price layout to read nicer (our price, you save etc). I then moved the “product attributes” and “buy button” up alongside the price, so it all looks like it is on one line. I then added a bit of candy (the faded underline effect) to break up this area from the “price” line and the “product info”.

I think it looks decent, what do you think?

Nice Testimonial

Done with the E-book
That sure made things easy.
Wish I had heard of it along time ago.
I would recommend it to any one that is learning
to use the OSC program. That is not php savvy.

Many Many Thanks
Ben

It’s always nice to receive good words from people who have found my tutorial useful. Thanks Ben!

If you would like to learn a bit more about how osCommerce “hangs together” in terms of a design have a look right here for the tutorial that Ben found so helpful.

Discount Coupon Version 3

STOP PRESS: This contribution is now updated to Version 5 and has all sorts of cool extras. Please see the latest post about this.

Discount Coupon Version 3

It’s time to update my Discount Coupon Mod to Version 3. This update has seen a bit of an overhaul to how coupons are applied – instead of having the “input your coupon code” box in the checkout_payment.php age it is now on the shopping_cart.php page as seen in the image below:

What this means is that it should now be compatible with the other modifications out there that do not make use of the full checkout procedure – eg amazon checkout, google checkout and so on. And, it is also more intuitive on the shopping_cart page as it is nice for a potential buyer to see what discount he is getting before he/she even has to log in.

So, my next task is to get this all bundled up ready for installation.

Summary of the Discount Coupon contribution – admin area

1. Shop Owner can insert any number of coupons, which can be “used once” or “used multiple” per customer. It is coded this way so that if you want to run a promotion, you do not have to create loads of coupons, just create one “use once” coupon – which can then be used once by an unlimited number of customers.

2. When coupons are used, shop owner is able to easily view the orders made on a per coupon basis (this is experimental code) but seems to work well.

Summary of the Discount Coupon contribution – catalog

1. Buyer is able to insert coupon code in the shopping_cart.php page.

2. Coupon is carried through the checkout process and shows in all order histories etc.

Future Updates

1. A “use once, one time” coupon.

2. Coupon Start and End Dates

3. Ability to set minimum spend on a coupon.

4. Ajax the coupon input on shopping_cart.php.

How you can get this

Once I am ready to do so, I will upload the modification to the osCommerce Contributions area. In the meantime I am able to install this for you at low cost – please email me if you wish to enquire about this.