Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

osCommerce Online Merchant v2.3.4


Recommended Posts

  • Replies 101
  • Created
  • Last Reply

The admin/includes/configure.php file is not included in the update package to prevent people overwriting their existing config files with a blank version. It's not included in the modified files listing as it is not a php code file but the changes are referenced in the relevant changeset.

 

Similarly, install/oscommerce.sql is not listed as a modified file but SQL changes are referenced in their relevant changesets.

:heart:, osCommerce

Link to comment
Share on other sites

Im currently ploughing ahead with the 2.3.3.4 to 2.3.4 upgrades - and am trying to understand each change rather than just copy & paste, hence my questions.

 

On the subject of forcing SSL on the Admin use by modding the 22 files why has this approach been taken? I have my Configs set to point to SSL for the admin and have the following line in my admin/.htaccess

SSLRequireSSL

as defined here: http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslrequiressl

 

Are the 22 files modified so that OSC auto detects if SSL is selected or not ?

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

The links in the admin produced by tep_href_link() have hardcoded NONSSL parameters. The hardcoded NONSSL has been removed thus the high number of files affected.

 

The admin tep_href_link() function has been updated to detect if ENABLE_SSL is enabled and to treat the default connection for links as SSL rather than NONSSL.

 

An even easier approach is to use a https url for HTTP_SERVER however it's not a clean consistent solution.

 

Forcing SSL with htaccess requires Apache. We are moving towards a web-server independent based solution to have a consistent behaviour across Apache, Nginx, IIS, ... and to document areas that need strengthening (eg, through the extended security check modules).

:heart:, osCommerce

Link to comment
Share on other sites

Hello :)

 

I'm very happy to see at least MVC pattern on oscommerce with Content Modules and templates. However, I miss the necessary documentation to develop our modules following this pattern. I could (and I do) to analyze the code to infer its logic. But it is clear that who has designed it can best explain. Some questions to inspire the documentation:

a) What feature aspects should be implemented according to this pattern and which are not?

b) What feature aspects should be implemented with templates and which are not?

c) Are they reusable? For example: Can I reuse the "Login form" module on another page than login?
What's the propper way?

 

d) Is this pattern a middle step to osc 3? Learning 2.4 MVC pattern are we learning osc3 develop ways?

 

e) What are the components of a Content Module? And their responsabilities? Which are essential and wich not?

 

These are only the first questions that pops on my mind, sure you have more, don't you? If we improve the documentation, we are also improving the quality of future and recycled contributions: I consider that it's crucial!

 

I vote for documentation moment, a lot of thanks :)

Link to comment
Share on other sites

I wouldn't exactly call it MVC ;)

 

a) What feature aspects should be implemented according to this pattern and which are not?
b) What feature aspects should be implemented with templates and which are not?

Currently only the Login, My Account, and Checkout Success pages support Content Modules. If you would like to add content to or rearrange content on those pages, doing so with Content Modules means no more source code changes are required.

 

The My Account page is different as it is built from an array of links. Content Modules on this page have the capability of adding/replacing/removing links from the My Account page.

 

Other pages will be updated to support Content Modules in the next v2.3.x releases.

 

c) Are they reusable? For example: Can I reuse the "Login form" module on another page than login? What's the propper way?

 

No. Content Modules require a group to belong to, which the group code is then called from the relevant page to load the modules.

 

d) Is this pattern a middle step to osc 3? Learning 2.4 MVC pattern are we learning osc3 develop ways?

 

No. What ends up being in v3 and down the line in v2.4 will be more flexible.

 

e) What are the components of a Content Module? And their responsabilities? Which are essential and wich not?

 

Content Modules are located in includes/modules/content/ inside group directories. Here are the pages and their relevant group codes:

  1. My Account -> account
  2. Checkout Success -> checkout_success
  3. Login -> login

Both Login and Checkout Success pages call their content modules before the template is loaded. This allows content modules to perform actions under certain conditions and to perform page redirects where necessary. The main My Account page does not perform any processing at all so its content modules are loaded in the middle of the template.

 

Content Modules are called with their group code:

 

$page_content = $oscTemplate->getContent('login');

For the login page, to avoid having each login content module have duplicate code to process the login, a $login_customer_id variable is processed - if it is set with a customer ID then the login page continues to register the customer in their session. It is up to the login content module to assign this variable as soon as it has authenticated the customer.

 

For example, Log In with PayPal authenticates the customer then assigns $login_customer_id with their customer ID which login detects and registers them in their session. It is possible to create a Google Login content module which authenticates the customer through Google, then that module must assign $login_customer_id to complete their session.

 

Some pages may need to initialize code before its first content module is processed. For these cases before the first content module is processed, it looks in the includes/modules/pages/ directory for a file matching the following name:

tp_CODE.php

The code matches the Content Module group being called. If such a file exists, it is executed then the content modules are processed.

 

This is used for the My Account page to initialize the base set of links that are shown on the My Account page.

:heart:, osCommerce

Link to comment
Share on other sites

Hi Harald - I have noticed that when updating to 2.3.4 from 2.3.3.4 when carrying out the $PHP_SELF changes - that my admin/includes/application_top.php has 2 instances of

$current_page = basename($PHP_SELF);

Should they both be changed to

$current_page = $PHP_SELF;

Many Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Thanks!

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hello @@Harald Ponce de Leon,

 

The Upgrade Instructions 2.3.3.4 to 2.3.4 say:

Improve $PHP_SELF (11 files)

This changeset improves the value of $PHP_SELF and keeps the path when the value is used in subdirectories (eg, viewing pages from the ext/ directory).

I Updated Mobile OsC to support osc 2.3.4 and found that the $PHP_SELF  updates in catalog/includes/classes/navigation_history.php broke my links, I got /mobile/ duplicated, for example: after logging in mobile/login.php the redirect URL(Depending on the history, of course) points to:

 

catalog/mobile/mobile/index.php

 

If I revert the update in navigation_history.php and leave basename($PHP_SELF) in all instances, all works fine like before.

 

Maybe this can produce issues in other add-ons too.

 

Kind regards

Rainer

 

PS: Mobile 2.3.4 support update is almost finished, including content modules support and PayPal login.  Works great , Thank You! :rolleyes:

Link to comment
Share on other sites

@@raiwa, you will have to update your add-on to support the fixed behaviour of $PHP_SELF. Modules taking advantage of the new Content Modules implementation may call pages from the ext/ directory which is why $PHP_SELF was fixed to be compatible with pages being called from subdirectories.

 

New behaviour:

 

account.php

ext/modules/content/account/set_password.php

 

Old behaviour with basename():

 

account.php

set_password.php (broken link due to basename()).

 

Hope that helps,

:heart:, osCommerce

Link to comment
Share on other sites

@@raiwa, you will have to update your add-on to support the fixed behaviour of $PHP_SELF. Modules taking advantage of the new Content Modules implementation may call pages from the ext/ directory which is why $PHP_SELF was fixed to be compatible with pages being called from subdirectories.

 

New behaviour:

 

account.php

ext/modules/content/account/set_password.php

 

Old behaviour with basename():

 

account.php

set_password.php (broken link due to basename()).

 

Hope that helps,

 

ok, I will do it. Thank You :)

Link to comment
Share on other sites

  • 2 weeks later...

Hello @@Harald Ponce de Leon,

 

I found a problem with the newest rbsworldpay_hosted.php payment module, signature = 'rbs|worldpay_hosted|2.1|2.3';

 

On a clients store it doesn't include detailed order information,neither products, neither comments, in the order confirmation e-mail.

Also the comments are not registered in the order status information in Admin Orders.

 

In the file it looks like it is coded to do so.

 

Please help, thank you.

 

Kind regards

Rainer

Link to comment
Share on other sites

Hello @Harald Ponce de Leon,

 

Some more details:

 

The order statuses used in the worldpay module configuration are the default like done during module installation. The issue is that due to high order statuses ids used before, the order status ids for the worldpay statuses are:

100015   Preparing [WorldPay] 100016   WorldPay [Transactions]

 

Could this break the order status checks in the worldpay module?

 

Thanks

Rainer

Link to comment
Share on other sites

Hello Harald @Harald Ponce de Leon,

 

Regarding the worldpay module I found the following:

1. In the order status table, orders_status_id is int(11)

    In the order status history table, orders_status_id is int(5)

    In the orders table, orders_status is int(5)

 

So in my clients store, as he had order status ids more than 5 digits, they were truncated in the order status history and orders table.

I fixed this increasing there to int(11).

 

Shouldn't this be the same digits in all 3 tables?

 

The worldpay module still didn't register the comments. I could fix this in:

includes/modules/payment/rbs_worldpay_hosted.php:

line 333:

added: $comments, to globals

 

line 373 changed:

                                  'comments' => $order->info['comments']);

to:

                                  'comments' => $comments);

$order->info['comments'] was always empty.

 

Now the comments register in Admin : Orders.

 

I'll continue researching for the missing details in the order confirmation e-mail.

 

regards

Rainer

Link to comment
Share on other sites

Hello Harald @Harald Ponce de Leon,

 

Regarding the worldpay module I found the following:

1. In the order status table, orders_status_id is int(11)

    In the order status history table, orders_status_id is int(5)

    In the orders table, orders_status is int(5)

 

So in my clients store, as he had order status ids more than 5 digits, they were truncated in the order status history and orders table.

I fixed this increasing there to int(11).

 

Shouldn't this be the same digits in all 3 tables?

 

The worldpay module still didn't register the comments. I could fix this in:

includes/modules/payment/rbs_worldpay_hosted.php:

line 333:

added: $comments, to globals

 

line 373 changed:

                                  'comments' => $order->info['comments']);

to:

                                  'comments' => $comments);

$order->info['comments'] was always empty.

 

Now the comments register in Admin : Orders.

 

I'll continue researching for the missing details in the order confirmation e-mail.

 

regards

Rainer

 

Hello Harald @Harald Ponce de Leon,

 

Could you please confirm that the missing product listing in the worldpay order confirmation mail is a known generic issue or may this be a puntual problem in that concrete store?

 

Thank you

Rainer

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

I am finishing my upgrade to osC 2.3.4.

 

On the account.php page I would like to change the layout for the section headers and the individual link items (e.g. remove the icon preceding an item).

 

The directory includes/modules/content/account is the only one missing a templates directory.

 

Where can I make these changes?

 

Kind regards,

 

Dennis

Link to comment
Share on other sites

Hi @@raiwa

 

these problem would be better to post into bug reports. You are right and I think it need typical bug fixes.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hi @@raiwa

 

these problem would be better to post into bug reports. You are right and I think it need typical bug fixes.

 

Ok sorry @@Gergely,

 

I'll use the correct forum next time. However I got the worldpay fix already from Harald and suppose he will update the module soon.

Or do you mean (also) the order status id issue?

 

Thanks and kind regards

Rainer

Link to comment
Share on other sites

When doing a manual upgrade to 2.3.4 I came across this situation.....

 

Over in the Open discussion on Better Navigation and Categories thread, about here:

 

http://www.oscommerce.com/forums/topic/395130-open-discussion-on-better-navigation-and-categories/page-2

 

Gary and Matt came up with versions of a box for recently viewed products.

 

So if you're doing the manual upgrade to 2.3.4 both versions have some "basename($PHP_SELF" that probably should be dealt with as per this "Improve $PHP_SELF (11 files)" portion of the upgrade instructions as well re http://library.oscommerce.com/Online&en&oscom_2_3&release_notes&v2_3_4

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...