VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: tomphillipspcs on July 26, 2017, 12:19:52 PM

Title: hide + and - quantity buttons in product page, cart and checkout
Post by: tomphillipspcs on July 26, 2017, 12:19:52 PM
I have added this to virtuemart.css but still these buttons show?

.quantity-box .quantity-input, .quantity-box .quantity-controls {
  display: none;
}

eg

http://upsobags.co.uk/bags/backpacks-2/burtonwood-backpack-detail

any ideas?

Title: Re: hide + and - quantity buttons in product page, cart and checkout
Post by: jenkinhill on July 26, 2017, 13:37:26 PM
You are not using the default VirtueMart templates so you have to use the right classes for the commercial overrides. A quick look at the code shows

<span class="quantity-controls js-recalculate">
            <input type="button" class="quantity-controls quantity-plus"/>
            <input type="button" class="quantity-controls quantity-minus"/>
         </span>


So maybe:   
.quantity-controls js-recalculate  {display:none;}
Title: Re: hide + and - quantity buttons in product page, cart and checkout
Post by: tomphillipspcs on July 26, 2017, 14:01:51 PM
Hi

Thanks for looking at that - it still seems to show after adding that code

eg

http://upsobags.co.uk/recycled-bike-bags/seat-packs/stirling-seat-pack-272-273-275-290-291-292-293-294-295-296-297-298-299-300-301-302-303-304-306-395-396-397-398-399-400-401-402-404-423-424-425-426-427-428-429-430-432-718-719-764-845-956-1099-detail

Title: Re: hide + and - quantity buttons in product page, cart and checkout
Post by: jenkinhill on July 26, 2017, 15:07:59 PM
That was only a suggestion. Look at the code and try other selectors.
Title: Re: hide + and - quantity buttons in product page, cart and checkout
Post by: hellorain on July 26, 2017, 15:55:00 PM
Hello,

try below code
find

.span quantity-controls js-recalculate in below file

/templates/evostore/css/A.virtuemart.css.pagespeed.cf.TDE8PcM6TR.css

place display:none there in that css.

Best Regards,
hellorain.



Title: Re: hide + and - quantity buttons in product page, cart and checkout
Post by: tomphillipspcs on July 26, 2017, 16:51:47 PM
I've ended up with this - that seems to work OK, bu will it get overwritten if I update virtuemart?

input.quantity-input{height:32px;width:25px;text-align:center;font-weight:700;padding:2px;display: none;}
span.quantity-controls{width:24px;float:left;padding-top:1px;margin:0 0 0 4px;display: none;}

#b-area .quantity-input.js-recalculate {
   width: 32px !important;
   height: 32px !important;
   -webkit-border-radius: 100% !important;
   -moz-border-radius: 100% !important;
   border-radius: 100% !important;
  display: none;
}