Jump to content

Template error with german translate on standard_cart


J-B

Recommended Posts

The "add to cart" button in domainregister.php for standard_cart have the problem that the button is to small to see the german text "In den Warenkorb".

 

See Attachement -> https://oc3.jaba.hosting/s/kud5QXtTdWIh5oz

 

I have report the Bug to WHMCS but WHMCS closed the ticket :mad:

 

== Steps to Reproduce ==

Set to standard_cart and set the german language and go to domainregister.php (cart.php?a=add&domain=register)

 

Same on Nederlands ...

 

== Expected Result ==

The result are to see the full text "In den Warenkorb" on the add to cart button.

 

WHMCS 7.1.1

 

 

 

The css code:

 

.domain-lookup-result .btn

{ width: 100px; }

 

Is NOT working.

 

Any Idea how to fix it?

Edited by J-B
Link to comment
Share on other sites

I think this is a long-known bug from v7 - I can certainly recall posting about it in the v7 early beta forum last year, but I think that sub-forum is now hidden from public view...

why it's not been fixed in v7.1, I can't imagine... it's almost as though the product wasn't thoroughly tested in anything other than English. :roll:

 

the tricky part about the solution, is that the css you mention is from standard_cart/css/all.min.css, but it gets called after 'custom.css' - so you can't tweak the custom.css using the usual method.

 

so you could either delete the line below from standard_cart/css/all.min.css

 

.domain-lookup-result .btn:not(.domain-contact-support){width:100px}

but then you might have to do that after every update...

 

or you could create a custom.css purely for the cart and modify standard_cart/common.tpl to...

 

<link rel="stylesheet" type="text/css" href="templates/orderforms/standard_cart/css/all.min.css?v={$versionHash}" />
<link rel="stylesheet" type="text/css" href="templates/orderforms/standard_cart/css/cartcustom.css" />
<script type="text/javascript" src="templates/orderforms/standard_cart/js/scripts.min.js?v={$versionHash}"></script>

and then create a cartcustom.css file in standard_cart/css/ and add...

 

/* *****************************************************

   ** Custom Cart Stylesheet **

   Any custom styling you want to apply should be
   defined here.

***************************************************** */

.domain-lookup-result .btn:not(.domain-contact-support){width:auto}

and that should set the button to the required width...

PUnGPpI.png

 

again, you might have to check common.tpl after each update - but hopefully if WHMCS fix this themselves, you might not need it in the future. :idea:

Link to comment
Share on other sites

I dont know why It is not working to me :(

 

/templates/orderforms/standard_cart71/css # cat cartcustom.css 
/* *****************************************************

   ** Custom Cart Stylesheet **

   Any custom styling you want to apply should be
   defined here.

***************************************************** */

.domain-lookup-result .btn:not(.domain-contact-support){width:auto}

 

/templates/orderforms/standard_cart71 # cat common.tpl 
<link rel="stylesheet" type="text/css" href="templates/orderforms/standard_cart71/css/all.min.css?v={$versionHash}" />
<link rel="stylesheet" type="text/css" href="templates/orderforms/standard_cart71/css/cartcustom.css" />
<script type="text/javascript" src="templates/orderforms/standard_cart71/js/scripts.min.js?v={$versionHash}"></script>  

Link to comment
Share on other sites

Sorry! It works!

 

I dont know why WHMCS always hardcoded the PATH to the template. WHY???

 

I have set standard_cart71 to default, but my whmcs get the common.tpl from "standard_cart".

 

Why not use

 

"orderforms/{$carttpl}/ ???

 

I have changed all files with orderforms/{$carttpl}/

Edited by J-B
Link to comment
Share on other sites

Sorry! It works!

I dont know why WHMCS always hardcoded the PATH to the template. WHY???

I have set standard_cart71 to default, but my whmcs get the common.tpl from "standard_cart".

Why not use

"orderforms/{$carttpl}/ ???

I have changed all files with orderforms/{$carttpl}/

I think they do it because other orderform templates use standard_cart files (e.g the slider and comparison templates) once you get beyond the products page... so carttpl might not necessarily be reliable if you're using a renamed cart template.

 

for example, if on your site you go to... cart.php?gid=1&carttpl=premium_comparison you'll see it creates a double-sidebar issue... that's likely caused by an error in your main theme... but if you never intend to use any orderform template other than your modified standard_cart, then this won't really matter.

Link to comment
Share on other sites

 

for example, if on your site you go to... cart.php?gid=1&carttpl=premium_comparison you'll see it creates a double-sidebar issue... that's likely caused by an error in your main theme...

 

Not really an error. I always must disable this lines ...

 

<!--

<div class="col-md-3 pull-md-left sidebar hidden-xs hidden-sm">

 

{include file="orderforms/{$carttpl}/sidebar-categories.tpl"}

 

</div> -->

 

That is why i use a custom standard_cart.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated