Jump to content
Latest News: (loading..)
burt

Bootstrap 3 in 2.3.4 - Responsive from the Get Go

Recommended Posts

@Demitry It used to be controlled by session.gc_maxlifetime in includes/functions/sessions.php

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

https://github.com/gburton/Responsive-osCommerce/commit/8c24032cae5de0d77a3d78196de6950a869d73f1

Custom Data allows the possibility to do kinky stuff with javascript.

Thank You to @BrockleyJohn for taking the time out to test prior to Core Commit.


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

@burt

1 hour ago, burt said:

https://github.com/gburton/Responsive-osCommerce/commit/8c24032cae5de0d77a3d78196de6950a869d73f1

Custom Data allows the possibility to do kinky stuff with javascript.

Thank You to @BrockleyJohn for taking the time out to test prior to Core Commit.

Example of how this could be used?

Malcolm


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites
7 minutes ago, ArtcoInc said:

@burt

Example of how this could be used?

Malcolm

You could disable the buy button if there's no stock...


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

@BrockleyJohn

3 minutes ago, BrockleyJohn said:

You could disable the buy button if there's no stock...

I have already done this by editing the core code. Are you saying that this can now be done with no core changes?

And, if so, can you give a sample?

Malcolm

Edited by ArtcoInc

If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

@ArtcoInc yes, but I'm going to test the code before I post it ;)


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
    function execute() {
      global $PHP_SELF, $oscTemplate;

      if (tep_not_null(MODULE_HEADER_TAGS_GRID_LIST_VIEW_PAGES)) {
        $pages_array = array();

        foreach (explode(';', MODULE_HEADER_TAGS_GRID_LIST_VIEW_PAGES) as $page) {
          $page = trim($page);

          if (!empty($page)) {
            $pages_array[] = $page;
          }
        }

        if (in_array(basename($PHP_SELF), $pages_array)) {
		  $script = <<<EOS
<script>
  $(document).ready(function() {
    $('*[data-in-stock]').filter(function () {
	  return $(this).data('in-stock') <= 0;
	}).each(function() {
	  $(this).addClass('disabled'); // use to change appearance
	  $(this).attr('disabled', true);
	});
  });
</script>
EOS;
        	$oscTemplate->addBlock($script, $this->group);
        }
      }
    }

pop that in a header tags module (base it on the grid list one but change the names obviously)


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

hi,

I noticed that product_info.php page and product_reviews.php (and likely some others) have addslashes($product_info['products_name']), which displays a backslash before an apostrophe in the alt tags for the product image. 

I changed it to stripslashes(),.. but was wondering if there is any significant purpose to keeping the addslashes() alt tags?

 


osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&amp;geo=US&amp;q=oscommerce

Share this post


Link to post
Share on other sites

another question... I installed a threat scanner and ran it. One of the things it identified was the /admin/define_language.php file. I know that this file had some security vulnerabilities in the older versions of osC. I assume that those vulnerabilities are now secured in that file. With what version of osC were these changes made to resolve the security issues? Thanks.

 

 


osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&amp;geo=US&amp;q=oscommerce

Share this post


Link to post
Share on other sites
4 hours ago, Demitry said:

hi,

I noticed that product_info.php page and product_reviews.php (and likely some others) have addslashes($product_info['products_name']), which displays a backslash before an apostrophe in the alt tags for the product image. 

I changed it to stripslashes(),.. but was wondering if there is any significant purpose to keeping the addslashes() alt tags?

 

That's not from core. The core code is

      echo tep_image('images/' . $product_info['products_image'], NULL, NULL, NULL, 'itemprop="image" style="display:none;"');

Doesn't populate alt at all


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
5 hours ago, Demitry said:

another question... I installed a threat scanner and ran it. One of the things it identified was the /admin/define_language.php file. I know that this file had some security vulnerabilities in the older versions of osC. I assume that those vulnerabilities are now secured in that file. With what version of osC were these changes made to resolve the security issues? Thanks.

 

 

not a bootstrap question.  ask it elsewhere please


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
8 hours ago, Demitry said:

hi,

I noticed that product_info.php page and product_reviews.php (and likely some others) have addslashes($product_info['products_name']), which displays a backslash before an apostrophe in the alt tags for the product image. 

I changed it to stripslashes(),.. but was wondering if there is any significant purpose to keeping the addslashes() alt tags?

 

as far as I recall, this is also true in all version of historical oscommerce

hence:  not a bootstrap question, please ask elsewhere


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

@BrockleyJohn, @burt

John, Burt, thank you for the replies.

John, The latest BS Edge does have this code in the product_info.php, page reviews, and others. The screenshot below is from the latest download of BS Edge in the product_info.php page.

Burt, with all due respect, I'm not sure how the osC community is supposed to help improve on this software when we cannot address issues, ..which are both present in the latest release of BS Edge.

If adding of slashes to alt tags is also true in all version of historical oscommerce, and this is an issue that had never been corrected, ..and it currently exists in BS Edge, ..then how is this not the place to address it?

Demitry

 

 

 

product_info-source.png

Edited by Demitry

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&amp;geo=US&amp;q=oscommerce

Share this post


Link to post
Share on other sites

@Demitry apologies - sloppy checking. I've never seen that code path before; I don't believe I've had a BS client yet that doesn't use large images which is the only time that statement gets used. I had to go back remove the large images from my test product to reproduce. The reason it is originally there is to prevent a quote (or double-quote) in the product name breaking the page or throwing an error. You should check whether either breaks your change.

2 hours ago, Demitry said:

@BrockleyJohn, @burt

If adding of slashes to alt tags is also true in all version of historical oscommerce, and this is an issue that had never been corrected, ..and it currently exists in BS Edge, ..then how is this not the place to address it?product_info-source.png

This isn't necessarily the place to address it because the scope of the project is to provide a responsive variant of the main osc release. The more additional change that's done, the harder it is to bring this variant and the main release stream back together in the future. The only serious departure from this has been php7 compliance because of the strength of demand from BS-users. If there's a big problem that prevents people using the project for some reason, an urgent new requirement (eg for google, meta data etc) or something that makes it much easier to create addons without changing core code then maybe there's a discussion to be had but I don't think that what you're raising here falls into these categories.

If changes are introduced for an issue that's carried through from the mainstream but which eventually gets fixed in a different way in the mainstream, that can create an extra migration issue for getting BS-based projects into a mainstream version at some point in the future.


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
2 hours ago, BrockleyJohn said:

This isn't the place to address it because the scope of the project is to provide a responsive variant of the main osc release.

This.  So please stop asking questions that are outside this scope.

You would be better off asking them in their own thread.


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

getting this error under PHP7.2 , have I forgotton to install an update? I take it this is right thread for this?

Warning: sizeof(): Parameter must be an array or an object that implements Countable in \includes\functions\general.php on line 89

Warning: sizeof(): Parameter must be an array or an object that implements Countable in \a*****\categories.php on line 976

Installed Version: osCommerce Online Merchant v2.3.4.1


 

Share this post


Link to post
Share on other sites

Geting this error on the content in Modules.

Warning: Use of undefined constant OSCOM_APP_PAYPAL_LOGIN_SORT_ORDER - assumed 'OSCOM_APP_PAYPAL_LOGIN_SORT_ORDER' (this will throw an Error in a future version of PHP) in public_html\includes\modules\content\login\cm_paypal_login.php on line 41


 

Share this post


Link to post
Share on other sites
1 hour ago, justcatering said:

Geting this error on the content in Modules.

Warning: Use of undefined constant OSCOM_APP_PAYPAL_LOGIN_SORT_ORDER - assumed 'OSCOM_APP_PAYPAL_LOGIN_SORT_ORDER' (this will throw an Error in a future version of PHP) in public_html\includes\modules\content\login\cm_paypal_login.php on line 41

https://github.com/gburton/Responsive-osCommerce/blob/c418847961c7a483f17f99c5fe04095520b47d8c/includes/apps/paypal/modules/LOGIN/LOGIN.php#L127-L130

 

This piece of code tries to find that, if it exists deletes it and replaces with something else.  If it does not exist, it likely throws that error.
Is the error still there?


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
1 hour ago, justcatering said:

getting this error under PHP7.2 , have I forgotton to install an update? I take it this is right thread for this?

Warning: sizeof(): Parameter must be an array or an object that implements Countable in \includes\functions\general.php on line 89

Warning: sizeof(): Parameter must be an array or an object that implements Countable in \a*****\categories.php on line 976

Installed Version: osCommerce Online Merchant v2.3.4.1

https://github.com/gburton/Responsive-osCommerce/blob/c418847961c7a483f17f99c5fe04095520b47d8c/admin/categories.php#L976

if (sizeof($cPath_array) > 0) {

Therefore your variable cPath_array does not exist.

cPath_array is made here:

https://github.com/gburton/Responsive-osCommerce/blob/c418847961c7a483f17f99c5fe04095520b47d8c/admin/includes/application_top.php#L220-L226

You'll need to do more investigations.  It could be a php7.2 problem.


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

Must be a PHP 7.2 issue! I just imported old converted databse using same method used on old PHP5.2 sites and converted ok imported ok in SQL but totaly crashed new site giving countless errors such as those below.

Warning: Use of undefined constant GZIP_COMPRESSION - assumed 'GZIP_COMPRESSION' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\includes\application_top.php on line 77

Warning: Use of undefined constant SEARCH_ENGINE_FRIENDLY_URLS - assumed 'SEARCH_ENGINE_FRIENDLY_URLS' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\includes\application_top.php on line 94

Warning: Use of undefined constant USE_CACHE - assumed 'USE_CACHE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\includes\application_top.php on line 131

Warning: Use of undefined constant SESSION_WRITE_DIRECTORY - assumed 'SESSION_WRITE_DIRECTORY' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\includes\application_top.php on line 144

Warning: Use of undefined constant SESSION_FORCE_COOKIE_USE - assumed 'SESSION_FORCE_COOKIE_USE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\includes\application_top.php on line 158


 

Share this post


Link to post
Share on other sites

I'd suggest that these problems stem from the use of an older database, as SEARCH_ENGINE_FRIENDLY_URLS and USE_CACHE both exist and are used.  The others probably do as well, if you check;

https://github.com/gburton/Responsive-osCommerce/search?utf8=✓&q=USE_CACHE

Replace USE_CACHE with the other missing things and you will see.


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 current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

OK after restore ran error script it did not report anything. However store front is OK but admin side is broken.

Warning: Use of undefined constant BUS_ENABLE_DELETE - assumed 'BUS_ENABLE_DELETE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\a*******\index.php on line 32

Sorry restore was back to default database as in new install of Edge

Edited by justcatering
update

 

Share this post


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

×