Jump to content
burt

Bootstrap 3 in 2.3.4 - Responsive from the Get Go

Recommended Posts

Burt don`t forget to change     define('LANGUAGE_CURRENCY', 'GBP'); and make it refer to default countries currency by default.

 

@@ShaGGy Les I think it's just filenames.php that is being depreciated at this point.

 

Dan

Share this post


Link to post
Share on other sites

@@ShaGGy

 

Replace FILENAME_XXX with the actual file name ie just eliminate the constants as is done in the core...once the addons are updated...problem solved.  There is no need for filenames.php.

 

Dan  

 

Theres 7,756 addons in there now and 99% refer to filenames.php as a band aid wouldn`t it be better to cover both bases ?

I am thinking about the public image of OSC being damaged as post will be appearing everywhere saying don`t bother with OSC nothing works when you install it etc etc

 

I know its not ideal but a sudden cut off so early in the transition could be damaging to OSC's popularity.

Share this post


Link to post
Share on other sites

Theres 7,756 addons in there now and 99% refer to filenames.php as a band aid wouldn`t it be better to cover both bases ?

I am thinking about the public image of OSC being damaged as post will be appearing everywhere saying don`t bother with OSC nothing works when you install it etc etc

 

I know its not ideal but a sudden cut off so early in the transition could be damaging to OSC's popularity.

A compatibility module can easily be developed that define the legacy constants that have been removed.


:heart:, osCommerce

Share this post


Link to post
Share on other sites

@@ShaGGy Les I think it's just filenames.php that is being depreciated at this point.

 

Dan

 

Dan yeah I just think this is one change that WOULD be welcomed as you know how many NON US users install then hit the USD still showing even though they have changed everything to their default country ect.

Share this post


Link to post
Share on other sites

Keep in mind Les that most of those addons will require either complete updating or changes to the core to work so if they are to be of any use they'll need to be updated anyway. 

 

Dan

Share this post


Link to post
Share on other sites

Addon makers have had 2.5 years to get used to the idea of it (and to actually start doing it).  It is time (and has been for 2.5 years) to embrace what's happening and roll with it.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

@@burt

 

Hi G

 

Just to confirm... up until today only the FILENAME_xxxxx constants from the catalog side have been cleaned right? The admin side still has them inside is that correct?

Edited by Tsimi

Share this post


Link to post
Share on other sites

Thats correct @@Tsimi

 

Admin side is next on the to-do list.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

BUG?

 

I was having issues removing items that have an attribute set against them in admin (microsoft mouse for example) from cart setting qty to 0 removed item also the product link in shopping_cart went to home page.

If the item has NO attributes the remove button works.

I had modular shopping cart installed and Option Types so I naturally thought one of these was causing the issue.

 

I did a fresh install of master(EDGE) with brand new blank database and the problem still exists with no edits at all the the core install.

I found the thread http://forums.oscommerce.com/topic/398381-remove-product-shopping-cartphp-issue-234/ and tied a few of the edits suggested in there but they either were incompatible with current files or they had no effect.

 

 

@Tsimi tried it and it was doing it on mine but his works (same build).

is this a bug / php version issue / session issue strange that it only happens on items with attributes assigned to them where the url has products_id=26{3}8&action=remove_product yet products_id=3&action=remove_product works.

Edited by ShaGGy

Share this post


Link to post
Share on other sites

@@ShaGGy

 

I cannot duplicate this. Perhaps it is your sessions settings, or server setup. But with the redirect to homepage issue happening, it could possibly be your cookie path set in configure file.

 

I did however notice that if not using update button when removing items from cart, the message stack alerting that item has been removed does not show up.


Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Share this post


Link to post
Share on other sites

@@ShaGGy

 

I cannot duplicate this. Perhaps it is your sessions settings, or server setup. But with the redirect to homepage issue happening, it could possibly be your cookie path set in configure file.

 

I did however notice that if not using update button when removing items from cart, the message stack alerting that item has been removed does not show up.

 

My cookie paths are set up like they were in working 2.3.1

also this issue only happens on items that have a attrib set on the product.

 

I.e if i add item product_info.php?products_id=26 to cart (this as attribs) this will not remove from cart and redirects to home page if you click its title.

if i add product_info.php?products_id=3 (this has no Attrib) this one does remove from cart and redirects to its item page if you click its title.

Edited by ShaGGy

Share this post


Link to post
Share on other sites

@@ShaGGy

 

That is what I tried, but cannot duplicate the issue. Redirects back to product as should, and removes from cart by enter 0 and update or the remove button.

 

What PHP version are you on?


Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Share this post


Link to post
Share on other sites

My cookie paths are set up like they were in working 2.3.1

also this issue only happens on items that have a attrib set on the product.

 

I.e if i add item product_info.php?products_id=26 to cart (this as attribs) this will not remove from cart and redirects to home page if you click its title.

if i add product_info.php?products_id=3 (this has no Attrib) this one does remove from cart and redirects to its item page if you click its title.

 I have raised a ticket with my host.

 

One thing i have noticed is my host Ipage use a path for the sql connection 'localhost' does not work .. could this be the issue?

Share this post


Link to post
Share on other sites

REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

 

One thing i have noticed is my host Ipage use a path for the sql connection 'localhost' does not work .. could this be the issue?

 

If your host runs the MySQL server on the same box as the site, it would usually be either localhost or 127.0.0.1 (loopback address) for the DB location. If the server is running on its own box, that will not work, but will require either a named server ("path"?) or a distinct IP address.

 

If this is happening, none of your DB actions should be working. You shouldn't see some working and some not, unless someone hard coded "localhost" into an add-on or something like that, instead of using the global settings for DB access.


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozenpatches or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

This is an FYI for a quick hack.

 

I enabled the ht_pages_seo header tag module to fight my duplicate title problem.

 

as i'm rather lazy and was dreading to add more language defines to the different language files.

I used the osc_language_definitions database structure (not the class) that whitehat backported to 2.4 (see github)

Fetched these defines in application top, very similar to the configuration table

// include the language translations
  $_system_locale_numeric = setlocale(LC_NUMERIC, 0);
  require(DIR_WS_LANGUAGES . $language . '.php');

//get some language defines from the database
//right now just SEO data
  $sql_query = 'select definition_key, definition_value 
                  from osc_languages_definitions
                 where languages_id = '.$languages_id.' 
                   and content_group = "'.basename($PHP_SELF,".php").'" ';
  $lang_define_query = tep_db_query($sql_query);
  while ($lang_define = tep_db_fetch_array($lang_define_query)) {
    define($lang_define['definition_key'], $lang_define['definition_value']);
  }
  
and furthermore added a fallback to the HEADING_TITLE in case the META_SEO_TITLE is not defined, and the HEADING_TITLE is.

 

      if ( (defined('META_SEO_TITLE')) && (strlen(META_SEO_TITLE) > 0) ) {
        $oscTemplate->setTitle(tep_output_string(META_SEO_TITLE)  . MODULE_HEADER_TAGS_PAGES_SEO_SEPARATOR . $oscTemplate->getTitle());
      } elseif ( ( defined('HEADING_TITLE')) && (strlen(HEADING_TITLE) > 0)) {
        $oscTemplate->setTitle(tep_output_string(HEADING_TITLE)  . MODULE_HEADER_TAGS_PAGES_SEO_SEPARATOR . $oscTemplate->getTitle());
      }
I'm assuming that everywhere you need more granular control like with categories, products, manufacturers etc you won't have HEADING_TITLE defined.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

If your host runs the MySQL server on the same box as the site, it would usually be either localhost or 127.0.0.1 (loopback address) for the DB location. If the server is running on its own box, that will not work, but will require either a named server ("path"?) or a distinct IP address.

 

If this is happening, none of your DB actions should be working. You shouldn't see some working and some not, unless someone hard coded "localhost" into an add-on or something like that, instead of using the global settings for DB access.

 

Hi Phil,

 

Yes they have a server path and this appears to be working, i think I have tracked down my issue to being something related to the cookies and cookie paths but still can not get it right,

it is either loosing the cart completely when i go to the home page

or

It will not remove items from the cart using the remove button (if the items contain attributes) it removes items from the cart that do not have attributes which is puzzling me.

 

I did a test install on a free host and that appears to work (out of the box with no changes to config) which then points me to a host issue.

 

I am at a loss to be honest on how to fix this issue.

Share this post


Link to post
Share on other sites

it is either loosing the cart completely when i go to the home page

When you say "Home Page", are you talking about osC's front page, or is this a page outside of osC? If you are going outside of osC, you will likely lose the session and thus the cart, unless you add code to your other pages to preserve the session. If you're staying entirely within osC, I don't have any idea what the problem is.

 

It will not remove items from the cart using the remove button (if the items contain attributes) it removes items from the cart that do not have attributes which is puzzling me.

I recall seeing other complaints about "remove item" not working properly when attributes are involved. I think you need to do some searching on this forum for the discussion about this, and the fix (if there is one).


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozenpatches or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

When you say "Home Page", are you talking about osC's front page, or is this a page outside of osC? If you are going outside of osC, you will likely lose the session and thus the cart, unless you add code to your other pages to preserve the session. If you're staying entirely within osC, I don't have any idea what the problem is.

 

I recall seeing other complaints about "remove item" not working properly when attributes are involved. I think you need to do some searching on this forum for the discussion about this, and the fix (if there is one).

By 'Home Page' I mean OSC front page.

 

 

It will not remove items from the cart using the remove button (if the items contain attributes) it removes items from the cart that do not have attributes which is puzzling me.

I have searched and can only find one that had any form of replys but that appears to have been a seo add on he had installed and there wasn`t a resolution to it.

 

I am convinced even more after today that something on my host is having an issue with the attribute part of the URL it almost as if when you click remove in the cart it doesn`t even run the action.

if you set qty to zero it then removes it

 

I have traced it to the point where if a item in the cart as attributes and the URL contain {xxx} then the remove_product function does not trigger in application_top.

 

I replaced the whole remove_product function with

$messageStack->add_session('product_action', sprintf(PRODUCT_REMOVED, tep_get_products_name($HTTP_GET_VARS['products_id'])), 'warning');

then added two items to the cart one with attribs and one without, if i click remove on the one with nothing happens, if i click remove on the one WITHOUT attribs the message is displayed, so shopping_cart.php is not passing the action through to apllication_top.php when theres a attrib.

 

Sleep time 7.30 am :( i'll have a look at shopping_cart.php later.

Share this post


Link to post
Share on other sites

@@burt

 

I have been trying to get to the bottom of products with attributes not removing from the cart

 

although i am convinced this appears to be an issue with my host affecting urls with the attrib {x}x{x}x part they say it is a oscommerce issue and the logs show

 

shopping_cart.php
PHP Warning: Unknown: function '1' not found or invalid function name in Unknown on line 0

 

I have installed the same install on a free host and it works fine.

 

Is this a issue with OSC ?

Share this post


Link to post
Share on other sites

I have been trying to get to the bottom of products with attributes not removing from the cart

 

although i am convinced this appears to be an issue with my host affecting urls with the attrib {x}x{x}x part they say it is a oscommerce issue and the logs show

 

shopping_cart.php

PHP Warning: Unknown: function '1' not found or invalid function name in Unknown on line 0

Most occurrences of this error on Google are about trying to set php parameters that are no longer supported - seems unlikely to be related,

but if your host supports choosing php version via your htaccess file, experiment with different versions.

 

I take it that if you put the url to the product with attributes straight into the browser, you end up at the home page? It's losing all the GET variables (when there are none, products_info redirects to index). Have you got search-engine-friendly urls turned on? Have you checked if magic_quotes_gpc is on? Are you doing any url rewriting?


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Any link in the shop is considered a valid link for ranking by the search engines. Having a link to the page the link is on doesn't make sense to a person but it does to the search engines. I suggest you leave it in.

Share this post


Link to post
Share on other sites

Most occurrences of this error on Google are about trying to set php parameters that are no longer supported - seems unlikely to be related,

but if your host supports choosing php version via your htaccess file, experiment with different versions.

 

I take it that if you put the url to the product with attributes straight into the browser, you end up at the home page? It's losing all the GET variables (when there are none, products_info redirects to index). Have you got search-engine-friendly urls turned on? Have you checked if magic_quotes_gpc is on? Are you doing any url rewriting?

 

In my case it does not redirect it stays on the cart page.

 

I have placed some print_r in shopping cart and it appears the action=remove_products is not being passed to or reaching application_top which again points to the url containing the attribs part {x}x{x}x is failing as the action functions on items with no attrib parameters in the url.

 

I did have a look through the php.ini last night for any setting that might be having an affect but could not see anything that it could be (I'll have another look today).

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×