Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

@@Dan Cole

 

I'd love to be able to control the width. Can the width be controlled from the iBar.css? Or, can only pieces of the bootstrap.min.css used instead of the whole file? I know less about css than I do php. @greasemonkey mentioned the same above.

 

Take care

Bill

Link to comment
Share on other sites

  • Replies 144
  • Created
  • Last Reply

@@Dan Cole

 

I'd love to be able to control the width. Can the width be controlled from the iBar.css? Or, can only pieces of the bootstrap.min.css used instead of the whole file? I know less about css than I do php. @greasemonkey mentioned the same above.

 

Take care

 

Bill

 

@@ecommunlimited  Bill I think I got it sorted out.  There was some css attached to the <HTML> tag and for the life of me I couldn't find it. It was driving me crazy.  (w00t)  It never occurred to me to look that far up in the file but finally through the process of elimination I tripped over it.  I sent you an updated package to have a look at.

 

Dan

Link to comment
Share on other sites

@@Dan Cole

 

what about in d_iBar_customer.php

 

add

      require_once (DIR_FS_ADMIN . 'includes/modules/dashboard/templates/ibar_css.php');

Then create dir templates and ibar_css.php

 

with....

<!-- BOF iBar additions -->
<link href="ext/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="includes/iBar.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- BOF iBar additions -->  

Removes the need to touch template top.... not  sure if removes all the extra css from loading tho????

Link to comment
Share on other sites

@@greasemonkey  Scott...I've already moved the changes from template_top.php to index.php as I mentioned in this post...

 

http://www.oscommerce.com/forums/topic/410593-dashboards/?p=1751984

 

I also sorted out the css issue and rework the stock dashboards to work without the fixed width tables.  At the moment I'm stuck and working on the equal heights issue.  This has become a much bigger task then simply adding the iBar modules.  Good thing I'm stubborn.  :(

 

Dan

Link to comment
Share on other sites

 

At the moment I'm stuck and working on the equal heights issue.  This has become a much bigger task then simply adding the iBar modules.  Good thing I'm stubborn.  :(

 

I thought an update would be in order.  I now know more about equal heights then I care too.  In looking at this issue I discovered Flexible boxes, or flexbox, a new layout mode in CSS3.  As I read about it, it seemed as though it would be a good solution for resolving my alignment issues.  Unfortunately as I tried to implement it I discovered that it wasn't quite right for what I wanted so back to the drawing board I went. This time my research revealed that bootstrap implemented flexbox in version 4 and made considerable improvements in its use.   I gave that a go and it worked pretty much as I wanted right out the box.  A few tweaks and my alignment issues were resolved. 

 

As this point I have what I think is a pretty nice looking modular dashboard.  Hopefully tomorrow I'll zip up the files and send it out to our testers again.     

 

Dan

Link to comment
Share on other sites

@@greasemonkey  My lastest change...restricting bootstrap to just the dashboard/index.php page seems to have sorted it out....there is still some css that needs adjusting but it is only on that page now.  The rest of the admin functions as it normally does.  All that was needed was to move the changes in template_top.php to index.php.  It is not ideal but it works.

 

Dan

 

Dan, if you can take a look at the 2.4 beta admin side you'll see it already uses bootstrap. Combining the css from 2.4 into 2.3 will produce a decent bootstraped site with jquery ui and no conflicts other than styles. I tried to integrate things before with no luck but it was much easier by comparing the files.

Link to comment
Share on other sites

@@Dan Cole here you havea picture with  my current setup applying the 2.4 styles to the dashboard. Just needed to tweak font sizes and replace tables with divs.

 

post-181458-0-26879300-1484350601_thumb.jpg

 

Basically I use rows and 6-column blocks but this could be changed on a config page for dashboards.

For equal heights you can try to adapt the shop side module and apply the equal-heights class to the panels.

<div class="row">
  <div class="col-md-6">
    <div class="panel panel-default"> <!-- here starts the module output -->
      <div class="panel-heading">Últimos Add-Ons</div>
      <div class="panel-body">
        <table class="table table-responsive table-hover table-condensed">
        </table>
      </div>
    </div><!-- here ends the module output -->

    <div class="col-md-6">
      <!-- another module -->
    </div>
    <div class="col-md-6">
      <!-- another module -->
    </div>
    [...]
  </div>
</div>
Link to comment
Share on other sites

Looks nice @@piernas Juanma.   Since those earlier posts I've made a fair bit of progress using bootstrap 4 with the introduction of flex.   There is still lots to do but it is shaping up nicely.  If you'd like to have a look PM me your email address and I'll send you a copy.  Knowing that you've already been down this path I'd welcome your comments on what we've done so far.

 

Dan

Link to comment
Share on other sites

I'm hoping our database expert/wizard is still around and in a charitable mood.  :)

 

I'm working on another iBar module to show me pending orders where we have not communicated with the customer in the last X days.  At the moment we use order status number 27 for ongoing communication with a customer when we're out of stock on an item, arranging a drop ship or perhaps sourcing a special item.  We're manually reviewing those orders at the moment but I'd like to set up an alert when one of those work in progress orders is older then say 5 days.  Once the order is dealt with it receives another order status number 27 if we are continuing to communicate with the customer, or some other order status number indicating that it shipped or whatever.  

I can get a list of orders older then 5 days having a status of 27 using the following query but I can't figure out how to eliminate those orders that were subsequently updated with another status 27 or some other order status.   Since the table contains the order number and the date is added with every update I'm thinking that this should be possible.   I just don't know how.

SELECT * FROM 'orders_status_history' WHERE 'orders_status_id' = "27" and 'date_added' >= DATE_SUB(CURDATE(), INTERVAL 5 DAY)

Dan

Link to comment
Share on other sites

@@Dan Cole surely it can be done with only one query but in my ignorane I'd do it by checking last status of each order you get from previous query.

 

Wait - From what I'm seeing latest order status is written on orders table so a join should be enough. I'll take a look to see Iif I'm able to do it.

Link to comment
Share on other sites

See if this works:

SELECT * FROM orders o INNER join orders_status_history osh WHERE o.orders_id = osh.orders_id AND osh.orders_status_id = 27 AND osh.orders_status_id = o.orders_status AND osh.date_added >= DATE_SUB(CURDATE(), INTERVAL 50 DAY) order by o.orders_id 
Link to comment
Share on other sites

mine looks similar, added the comments to see the latest communication and then ends up

select  o.orders_id, max(osh.comments)
  from orders o join orders_status_history osh using (orders_id) 
where o.orders_status = 27 
  and osh.date_added <= date_sub(curdate(), interval 5 day)
  and osh.orders_status_id = 27
  group by orders_id

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

Link to comment
Share on other sites

I forgot that there was some order status information in the orders table.  Good thinking. 

 

Looking at the orders table it looks like both the fields I need, the last_modified and orders_status are also contained in the orders table so perhaps all I need to do is change the query I posted so it references the orders table and not the order_status_history table.  That seems to easy so I'm wondering if those fields are in the stock osC database or if I added them along the way?  Are they in your database - if not I'll use one of the queries provided so I end up with a iBar module that is useful for anyone in the community.

 

Oh and has anyone seen my shoes, glass or most of all my memory? (w00t)

 

Dan

 

 

 

 

Link to comment
Share on other sites

I forgot that there was some order status information in the orders table.  Good thinking. 

 

Looking at the orders table it looks like both the fields I need, the last_modified and orders_status are also contained in the orders table so perhaps all I need to do is change the query I posted so it references the orders table and not the order_status_history table.  That seems to easy so I'm wondering if those fields are in the stock osC database or if I added them along the way?  Are they in your database - if not I'll use one of the queries provided so I end up with a iBar module that is useful for anyone in the community.

 

Oh and has anyone seen my shoes, glass or most of all my memory? (w00t)

 

Dan

 

 

I just remembered (it kicks in after awhile - probably the coffee) I have a stock 2.4 test install so I checked and it looks like those fields are standard osC.

 

Dan

Link to comment
Share on other sites

@@bruyndoncx  @@piernas  Wanted to say thanks for taking the time to develop those sql queries.   I think I'll just query the orders table but the queries you produced will be very useful as I add a separate page to pull up the details of the orders requiring attention.  Time well spent.

 

So thank you. :thumbsup: 

 

Dan 

Link to comment
Share on other sites

This contribution has now been uploaded to the addons area...the support thread and link to the package can be found here.

 

A number of community members helped move the development along and in that regard I would like to express my appreciation
and thanks to:

Bill aka ecommunlimited
Scott aka greasemonkey
Omar aka Omar_one
Juanma aka piernas
Carine aka Bruyndoncx

 

Many Thanks...

 

Dan

Link to comment
Share on other sites

One of the things I've noticed over the years is the importance of continually adding new products.   It not only helps to keep your store fresh and up-to-date but it also helps to increase sales and attract new customers.

To ensure that this gets the focus it needs I'd like to add another iBar module to show me the number of new products added and the total sales generated from those products during a specified period...say monthly, quarterly or whatever.

That brings me to the reason for this post.   I know where to get the data needed but I'm sure how to pull it together in an efficient why.  Yes I need help with another query.    :lol:

Wanting to learn I gave it a go and here is what I came up with.   It seems almost to easy so I'm not sure if I'm finally understanding SQL or if I'm a complete moron.  Could one of our data wizards chime in on that.   If there is a more eloquent way to do this, I'm interested.

SELECT COUNT(*) AS "New Products",
SUM( op.final_price * op.products_quantity ) AS "Total Sales"
FROM products p
JOIN orders_products op using (products_id)
WHERE p.products_date_added >= date_sub(now(), interval 30 day)

Please be gentle and try not to laugh to loudly.   There are people sleeping. (w00t)

Dan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...