Jump to content
burt

Responsive osCommerce - Bootstrap

Recommended Posts

I always knew  you guys were full of BS ;) ;) ;)

Yeah, I had some discomfort with that initially, but got used to calling it "BS". It probably should have been "R" (for responsive), but that's water under the bridge.

 

99% of what we (this awesome community) have done over the past 2.5 years is IN !

We should all be very proud of this.

Seriously, that's GREAT! I would have hated to see so much dedicated effort thrown out (I hope Harald was able to keep much of his work in, too). It will be a relief not to have to tell newcomers to forget about the official version and to use some informal "community supported" version from GitHub instead. Now osC can speak with one voice.

 

osC has traditionally been "released when it's ready, not on a fixed schedule". While of laudable intent, that is a problem in that current and potential users have no idea how long it's going to be until a product refresh... weeks, months, years? osC gets the reputation of not being maintained and enhanced, and that's a severe image problem. If The Powers That Be (Harald, et al.) don't want to commit to a schedule, could something else be done to enhance communications with the community and with the ecommerce world at large? Perhaps a rolling (continuously updated) Road Map included with the official download: "This is what is in the pipeline, this is the near-term stuff we're finishing up (and should be in the next release), and the next release is probably early 4Q 2017 if all goes smoothly." That sort of thing.

 

Share this post


Link to post
Share on other sites

v3.0 will hit you hard in the face :P It's more javascripty because of modern user interface design principles. People with javascript disabled should surf the web on a WAP device and complain about life in some WAP optimized forum out there.

Palin = 2.3.x

Cleese = 3

 


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

@GLWalker

There 2 examples :

One to execute a function, one to display something

Also if a hook exist you can extend with another hook. Advantage no intervention in the code and in orignal hook but for not the best solution (depends of the situation)

 

 

Hook with call  (not display)

$OSCOM_Hooks->call('Orders', 'ActionDeleteConfirm');




<?php

  namespace OSC\OM\Module\Hooks\Admin\Orders;

  use OSC\OM\OSCOM;
  use OSC\Sites\Admin\OrderAdmin;

  class ActionDeleteConfirm {

    public function __construct() {

      if (OSCOM::getSite() != 'Admin') {
        OSCOM::redirect('index.php');
      }

      $this->restock = $_POST['restock'];
      $this->oID = (int)$_GET['oID'];
    }

    private function redirect() {
      OSCOM::redirect('admin/orders.php', osc_get_all_get_params(array('oID', 'action')), 'AUTO');
    }

    public function execute() {
      OrderAdmin::removeOrder($this->oID, $this->restock);
      $this->redirect();
    }
  }

Hook with with display (very simple)


Registry::get('Hooks')->call('AllShop', 'FirstTime');


<?php
  namespace OSC\OM\Module\Hooks\Shop\AllShop;

  class FirstTime {
    public function execute() {
        echo TEXT_INSTALL;
        echo '   <div class="text-md-center;"><br /><a href="http://www.mysite.org/" target="_blank"><img src="images/logo.png" border="0" height="100" width="100" alt="Site"><br />Go to Site</a></div>';
        echo '   <div class="text-md-center" style="font-size: 10px;padding-top:10px;">blabla <a href="http://www.mysite.com" target="_blank">mysite</a>.</div>';

    }
  }
Edited by Gyakutsuki


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites

Ok, tk you



Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites

i have just recently spent a few days of getting a store in sync with edge

 

then a mail ticks in from a programmer i have hired for a job creating a a addon that can calculate avg. delivery times so we have an idea on how long it takes to delivery

 

 

this programmer says that 2.4 will be the end of life for the responsive version.... is he right? or would responsive live on and take bits from 2.4?


Quo plus habent, eo plus cupiunt

Share this post


Link to post
Share on other sites

going through every setup in admin i got a strange thing

 

when i click modules and then content i get huge fonts and the page starts with the store front main text... 

 

where can this happen? as soon i click somewhere else in admin everything is back to normal


Quo plus habent, eo plus cupiunt

Share this post


Link to post
Share on other sites

figured it....language file for cm_i_text_main.php  done wrong


Quo plus habent, eo plus cupiunt

Share this post


Link to post
Share on other sites

@@burt

 

There seems to be another dude that has problems with the shopping cart page functions. What's going on? Is this some latest server security upgrade issue? Or bad server configuration? Cheap server thing?

First it was just 1 guy now there are 2 if this becomes more and more then.... well not good.

Share this post


Link to post
Share on other sites

this programmer says that 2.4 will be the end of life for the responsive version.... is he right? or would responsive live on and take bits from 2.4?

 

What do you mean by "the responsive version"? Are you referring to 2.3.4BS? If so, when 2.4 officially comes out, there should be some sort of EOL for 2.3.4BS, to encourage everyone to move up to 2.4. osC 2.4 will be responsive, too, with some sort of upgrade path expected from 2.3.4BS.

Share this post


Link to post
Share on other sites

@@burt

 

There seems to be another dude that has problems with the shopping cart page functions. What's going on? Is this some latest server security upgrade issue? Or bad server configuration? Cheap server thing?

First it was just 1 guy now there are 2 if this becomes more and more then.... well not good.

 

Lambros...I wondering if it is the same host? One that is trying to tighten their security.  Luckily the fix seems pretty simple.

 

Dan

Share this post


Link to post
Share on other sites

Hi all,

Sorry had to post here in this topic as the fix was provided here.....

Thanks @@ShaGGy for the beautiful fix code update you provided at

http://forums.oscommerce.com/topic/396152-bootstrap-3-in-234-responsive-from-the-get-go/page-95#entry1746523

My remove products function has started working perfectly.
But the issue yet lies in the product name link and edit product link on shopping product page. They yet redirect to index.php on click.

 

I use oscommerce 2.3.4 and As I am using SEO URL addon so the URLs change to below for example after I add the fix :-
 


http://www.radhavallabh.com/radhakrishna-store/sparkle-curves-deity-metal-earrings-p-3014%7B2%7D15.html

but yet end up redirecting to index.php .

 

If you could shed some more light on how to fix the above too it would be very helpful.....
Thanks in advance;
Regds/
Radhavallabh

Edited by radhavallabh

Share this post


Link to post
Share on other sites

Hi all,

Sorry had to post here in this topic as the fix was provided here.....

Thanks @@ShaGGy for the beautiful fix code update you provided at

http://forums.oscommerce.com/topic/396152-bootstrap-3-in-234-responsive-from-the-get-go/page-95#entry1746523

 

My remove products function has started working perfectly.

But the issue yet lies in the product name link and edit product link on shopping product page. They yet redirect to index.php on click.

 

I use oscommerce 2.3.4 and As I am using SEO URL addon so the URLs change to below for example after I add the fix :-

 


http://www.radhavallabh.com/radhakrishna-store/sparkle-curves-deity-metal-earrings-p-3014%7B2%7D15.html

but yet end up redirecting to index.php .

 

If you could shed some more light on how to fix the above too it would be very helpful.....

Thanks in advance;

Regds/

Radhavallabh

 

There doesn't seem to be anything wrong with your fix. You are now encoding the characters but your host is still stripping the query string. Speak to them to see if they can resolve for you. osc is not the only application that uses curly braces in the urls.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

Hi, Thank you so much for the reply I further tested this...

When I turn off the Ultimate SEO addon the URLS begin to work using this code fix..... :)

 

But I need to get them working with the Ultimate SEO addon set enabled to true :(

 

Please can you guide me further on how can this be worked about;

 

Thank you in advance

Regards/

Radhavallabh

Share this post


Link to post
Share on other sites

I'm a "dude" that's having these problems.  See my posts Can't add products to shopping cart - clean osC v2.3.4 install

and Remove product shopping cart.php issue 2.3.4 .

 

Still have questions unanswered in those posts.  Here, I'll repeat a question about ShaGGy's fix “the two functions (remove from cart and product link in cart)” -- is that for BS or non-BS v2.3.4 ?  I can find his code search strings in either version, in any shopping_cart.php file versions.

 

If I am to consider the BS version, where do I look for add-ons to see if my required mods (QPBPP mainly) have been adapted for BS ?

Share this post


Link to post
Share on other sites

@@jjlyman try this solution:

 

in catalog/includes/functions/html_output.php and catalog/admin/includes/functions/html_output.php, in the tep_href_link() function definition:

 

replace:

 

    if (tep_not_null($parameters)) {
      $link .= $page . '?' . tep_output_string($parameters);
      $separator = '&';
    } else {
      $link .= $page;
      $separator = '?';
    }
with:

 

    if (tep_not_null($parameters)) {
      $p = array();
      $query = parse_str($parameters, $p);
      $parameters = http_build_query(filter_var($p, FILTER_CALLBACK, ['options' => 'urlencode']));

      $link .= $page . '?' . tep_output_string($parameters);
      $separator = '&';
    } else {
      $link .= $page;
      $separator = '?';
    }
This will apply urlencode() to all url parameters and encode where necessary.

:heart:, osCommerce

Share this post


Link to post
Share on other sites

@@Harald Ponce de Leon

Thanx for the wonderful solution....

But I am not able to use this code as I am using the Ultimate SEO URLS addon hence this part is commented out...

can you please suggest how shall I add this to my code please...

 
//// The HTML href link wrapper function
 //function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
//    global $request_type, $session_started, $SID;
//
//    $page = tep_output_string($page);
//
//    if (!tep_not_null($page)) {
//      die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine the page link!<br /><br />');
//    }
//
//    if ($connection == 'NONSSL') {
//      $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
//    } elseif ($connection == 'SSL') {
//      if (ENABLE_SSL == true) {
//        $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
//      } else {
//        $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
//      }
//    } else {
//      die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL</strong><br /><br />');
//    }
//
//    if (tep_not_null($parameters)) {
//      $link .= $page . '?' . tep_output_string($parameters);
//      $separator = '&';
//    } else {
//      $link .= $page;
//      $separator = '?';
//    }
//
//    while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
//
//// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
//    if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
//      if (tep_not_null($SID)) {
//        $_sid = $SID;
//      } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
//        if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
//          $_sid = tep_session_name() . '=' . tep_session_id();
//        }
//      }
//    }
//
//    if (isset($_sid)) {
//      $link .= $separator . tep_output_string($_sid);
//    }
//
//    while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);
//
//    if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
//      $link = str_replace('?', '/', $link);
//      $link = str_replace('&', '/', $link);
//      $link = str_replace('=', '/', $link);
//    } else {
//      $link = str_replace('&', '&', $link);
//    }
//
//    return $link;
//  }


// Ultimate SEO URLs v2.2d
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   //global $link;
	//	if($page == '') { 
	//	$page = basename($_SERVER['PHP_SELF']);
// }

   global $seo_urls;   
     
               
   if ( !is_object($seo_urls) ){
    if ( !class_exists('SEO_URL') ){
     include_once(DIR_WS_CLASSES . 'seo.class.php');
    }
    global $languages_id;
    $seo_urls = new SEO_URL($languages_id);
   }
   
   return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
 }

Thanx in advance..

Regds/

Radhavallabh

Edited by radhavallabh

Share this post


Link to post
Share on other sites

@@radhavallabh try this in both catalog/includes/functions/html_output.php and catalog/admin/includes/functions/html_output.php:

 

Directly after the "global $.." line in the tep_href_link() function definition, add the following "if" statement:

 

  function tep_href_link(.....) {
    global $.....;

    if (tep_not_null($parameters)) {
      $p = array();
      $query = parse_str($parameters, $p);
      $parameters = http_build_query(filter_var($p, FILTER_CALLBACK, ['options' => 'urlencode']));
    }

    .......
  }

:heart:, osCommerce

Share this post


Link to post
Share on other sites

@@Harald Ponce de Leon

Hi,

I added the code

The product link and image have started to work, They do not redirect to index.php any longer

 

But the remove action still does not work....

What shall be done...

 

Thanx for helping me sort this issue..... Hope to get it working soon

Regds/

Radhavallabh

Edited by radhavallabh

Share this post


Link to post
Share on other sites

@@radhavallabh Sorry, somebody else will need to look into it. You should ask your hosting provider to allow {} characters in the url.

 

If this can't be fixed with the urlencode() method, the other solution is to replace { } characters however this will need to be done for all the installed add-ons too (eg, Ultimate SEO searches for { characters).


:heart:, osCommerce

Share this post


Link to post
Share on other sites

@@Harald Ponce de Leon

Hi,

I added the code

The product link and image have started to work, They do not redirect to index.php any longer

 

But the remove action still does not work....

What shall be done...

 

Thanx for helping me sort this issue..... Hope to get it working soon

Regds/

Radhavallabh

 

There is no need to SEO the remove link - if you can get remove working without SEO, use an unmodified function to create the remove link (ie use a copy of the original osc function with a different name).

You shouldn't be letting search engine spiders into your shopping cart anyway!

Edited by BrockleyJohn

For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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,

@@BrockleyJohn

I am using the default remove function of oscommerce and just the Ultimate SEO addon;

I have not SEO ed the action links at all.... Still the remove button refuses to work with the beautiful function Sir @Harald Ponce de Leon provided me :(

 

Still will not give up.... :thumbsup: Right now am in talks with my host and have created a support ticket regarding curly braces... Will get back with reply as soon as they answer me.

Regds/

Radhavallabh

Edited by radhavallabh

Share this post


Link to post
Share on other sites

I am not sure if this is the right thread for my question, I apologize if not and I'll be grateful for a redirect.

I installed OsCommerce 2.3.4 BS edge and some modules (Discount_Codes_3.8_BS; KissIT_image_thumbnailer_r26; theme_switcher_1.5.3_1_2 (installed theme is "Slate").

Now I'd like to customize the Logo strip in the header giving it a bgimage and adding  aside the logo the ResponsiveSlides.js-master, plus a div with some text. Could not find any add-on to modularize that area horizontally.
I hoped I found a workaround modifying the file includes/modules/content/header/templates/logo.php this way:

<div  class="col-sm-12" style="background: url(http://tibowdesign.com/tishopping/images/headerbg.jpg); height:400px; margin-top:-25px;">

	<div id="storeLogo" class="col-sm-<?php echo $content_width; ?> storeLogo" style="margin-top:25px;">
	  <?php echo '<a href="' . tep_href_link('index.php') . '">' . tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME) . '</a>'; ?>
	</div>
    <div id="sliderFrame" class="col-sm-2" style="padding-top:25px; padding-left:0px;">
		<ul class="rslides" id="slider1">
		  <li><img src="ImgSlider/images/CA-0009.jpg" alt=""></li>
		  <li><img src="ImgSlider/images/CA-0010.jpg" alt=""></li>
		  <li><img src="ImgSlider/images/OA-0024.jpg" alt=""></li>
		</ul>
    </div>
    <div id="sliderText" class="col-sm-8" style="padding-top:25px; padding-left:0px;">
<p>Orna il tuo corpo con il metallo che ha portato l'uomo nello spazio!</p>
    </div> 

 </div>

Everything works fine, except that when i resize the browser window the two directories I've added ("sliderFrame" and "sliderText" are not taken into account when changing the elements disposition from horizontal to vertical, so that they overlap the page sections underneath.
You can see the effect here:
http://www.tibowdesign.com/tishopping/index.php

 

Is there anybody so kind that could suggest me which and where modifications are needed to solve this question?
Thank you

 

 

Share this post


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

×