Front-end invoice manager style

0
Hello

I've been trying to reproduce the look of your demo of the front-end invoice manager screen and I've only been able to do it if I assign the protostar template to the menu item of the manager. However, since I don't use the protostar template, this is not a solution for me. I could search every single class that is in protostar's template.css file and affects invoice manager, and add it in my own template.css but it's gonna take an awful amount of time, with dubious results. How come you haven't added your own css files for the component? How do you suppose I could do this?

Thank you
Responses (8)
  • Accepted Answer

    Tuesday, March 24 2015, 10:31 PM - #Permalink
    0
    I can't help wondering why have you placed classes in your html that are styled only in protostar's css files. What was the reasoning behind this? Did you suppose that all of your clients would be using protostar as their template?

    Also there are some javascript shit that should be hapenning no matter the template but they happen only on protostar, like hiding the dropdown form field for showing more payments, if there are no more payments to show.

    Please check attached pics to understand my problems

    Long story short, can I have a css file and a js file containing the needed modifications?

    Thank you
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, March 24 2015, 11:48 PM - #Permalink
    0
    investigating further I realised that your classes are bootstrap classes. However, even though I do load bootstrap, as you can see in the pics I posted it doesn't work. I installed an additional plugin specifically to load bootstrap (again) and now, a few things are right but most look really bad, definitely not like they're supposed to. I got the problem with the modal class (a weird looking fixed modal link appears, which looks like a search field, and it opens the last payment), the form I talked about earlier is still there, although it shouldn't be on the html at all (pic 2), etc. Anyways, using bootstrap just to style a few component pages is the easy way out and apparently it can create many problems. "Bootstrap enables developers to reach MVP stage really fast, then get customers using the product." I expected more from you....

    http://www.zingdesign.com/5-reasons-not-to-use-twitter-bootstrap/
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, March 25 2015, 06:36 AM - #Permalink
    0
    Well I fixed it. I ended up adding the bootstrap files in all view.html.php files (invoice,invoices,payment). As for the rogue dropdown field, I just removed it from the default.php file of the invoices directory. Btw, if I click to pay a payment through the invoices screen, all is well, url is the one I chose through the menu item of the component eg domain.org/your-invoices?view=payment&id=18 (your-invoices is the alias I put for the menu item). However if i try to pay through the invoice screen then the url becomes domain.org/component/invoices/?id=18&lang=en&view=payment and ofcourse it loses all of the assigned modules etc. I managed to fix that as well by changing line 319 of the components/com_invoices/helpers.php file from what it was to

    $absolute_url = $uri->toString();
    if ( strpos($absolute_url,'auth_code') != false ) {
    $link = $uri->base() . 'index.php?option=com_invoices&view=payment&id='.$payment_id ;
    }
    else {
    $link = JRoute::_('index.php?option=com_invoices&view=payment&id='.$payment_id);
    }

    These are bugs that should not be there, and I found them after just a few hours of poking through the component. I feel like i'm back to joomla 1.5 days
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, March 25 2015, 12:14 PM - #Permalink
    0
    Hello!

    Yes it uses normal Bootstrap classes (any template using bootstrap will display them)

    Bootstrap is used because it is Joomla native and actually most of the extensions use it (many many tempalte are based on it, too). The good thing is that since its joomla native, even if the template doesn't use it, it can be loaded directly from the joomla files.

    honestly I don't understand your critizism in this post. you share a link about "5 reasons to not use bootstrap". if you don't want to use bootstrap.. don't use joomla! I can share with you 1.000 links about "reasons to USE bootstrap"...

    finally, the last thing you are describing it's about the MENU ITEM ID (used in the links as you know to "maintain the navigation", sort to speak.

    there's no "bug" here, again I don't understand the comment about "going back to joomla 1.5 days". I honestly feel like being attacked for no reason.

    the reason for the $link being constructed differently is because if you generate the invoice from backend (sending email, PDF, etc), since the application is different, the JRoute() does not work (I mean, it works but it actually does nothing, because in the backend there's no URL transformation), so to avoid this, the way is to do it "directly", without using the JRoute function, that's all.. it's the way to mantain uniformity if you send the invoice from the backend, that's it, it's not a "bug"
    The reply is currently minimized Show
  • Accepted Answer

    Friday, March 27 2015, 08:41 AM - #Permalink
    0
    is there any other way to send an invoice? through the backend is the only choice as far as I know. Besides, the url i'm talkng about is a payments url, not an invoice url as you suggested, in other words it's a url that is going to be used ONLY from the front-end, i'm not going to start paying my client's payments myself through the backend (or the front end for that matter).

    As for bootstrap, no self-respecting template uses it. And if you wanna know, it took me 2 days to resolve all of the css conflicts between bootstrap, your component and my template, and after many hacks in invoice manager's core files I finally managed it. This could/should had been avoided if only you had provided a customised html output with a few custom css lines, that's all invoice manager needs after all. Bootstrap is 150k of code + 5-6 handshakes with the server, and out of all that only a few lines are esentially used by your component, and if you had provided them you would have ensured 100% uniformity and trouble-free installation in all of your customer's projects.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, March 27 2015, 10:40 AM - #Permalink
    0
    you can send it in the frontend too (users can send them to their inbox)
    I didn't suggest invoice URL, I am also talking about the payment URL. I can see you didn't understand what I was saying, or I didn't explain right. It's a technical thing. the JRoute function, when generated from backend, does NOT construct the URLs as SEF URLs. that's why the system works that way. I'm not going to extend on this.. it's boring! ;) the point is that there's a reason for it.

    Thanks for your suggestion, we will work to reduce the amount of bootstrap CSS loaded. Thanks.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, March 29 2015, 08:07 AM - #Permalink
    0
    Ok, so after reaching the stage of checking the emails sent (how they look etc) I realized what you were talking about, concerning the payment links. My code produced a payment link in the email that instead of my domain, it had the email's domain. That was very simple to fix by changing the code to

    $absolute_url = $uri->toString();
    if ( strpos($absolute_url,'auth_code') != false ) {
    $link = $uri->base() . 'index.php?option=com_invoices&view=payment&id='.$payment_id ;
    }
    else {
    $link = JRoute::_('index.php?option=com_invoices&view=payment&id='.$payment_id);
    $link = $uri->base() . $link; //this line fixes the issue
    }

    Only issue is that the payment link now has a double slash (e.g. http://domain.com//your-invoices?view=payment&id=18). Not a real problem, and it can be fixed as well.

    So now, links work as they should n emails, and I get to keep joomla url rewriting.

    btw, I just noticed that sending a quote to yourself (through the front-end ofcourse) sends the email with title 'Invoice #' instead of 'Quote #'. Sending it through the back-end works as expected
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 30 2015, 11:03 AM - #Permalink
    0
    hello,

    good thing if that solves the issue. to remove the double slash, I believe if you use $uri->base(true) I think it avoids the slash.
    otherwise you can do a simple "str_replace" function to replace all double slashes with single slashes.

    Thanks for the "quote" email title notice. I will look into it.
    The reply is currently minimized Show
Your Reply