Author Topic: Activating + - quantity adjustment when adding to cart  (Read 276 times)

zoki_ma

  • Beginner
  • *
  • Posts: 6
  • A beginner
Activating + - quantity adjustment when adding to cart
« on: March 25, 2019, 15:04:50 pm »
Hi everyone, I'm back with another question.

Site that I manage has the following:

Joomla! 3.8.7 Stable
VirtueMart 3.2.4
Template: TP Runway (I think)
Overrides: not sure if there are any, where to check?
PHP Version 7.0.33
Database Version    5.5.5-10.1.38-MariaDB
Using SEF links: YES

Problem that I have now is that site doesn't have the + - quanity adjustment so that shoppers can add more than 1 item to cart.
Here's an example product:
Code: [Select]
https://www.masiva-bj.hr/index.php/proizvodi/rezervni-dijelovi-za-traktore/imt-577-578/motor/5001702-detail.html
I've googled the issue and there's plenty of topics where people ask for help removing this feature. That's what must have been done here.

I found this code:

Code: [Select]
<div class="center">
<label for="quantity32871" class="quantity_box">Količina: </label>
<div class="quantity-area">
<span class="quantity-box">
<input type="text" class="quantity-input js-recalculate" name="quantity[]" readonly
data-errStr="Ovaj proizvod je moguće kupiti samo u paketu od %s komada."
value="1" init="1" step="1"  />
</span>
<span class="quantity-controls js-recalculate">
                                            <input type="button" class="quantity-controls quantity-plus" value="&plus;"/>
                                            <input type="button" class="quantity-controls quantity-minus" value="&minus;"/>
</span>                                       
</div>

Usually it's done through CSS and whatnot. I checked around 20 template overrides and CSS files and I couldn't find that sweet "display: none" option anyone. I did find a few, but none of them are hiding these controls.

Is there some painfully obvious configuration toggle within Virtuemart itself that's hiding this feature? Cause I looked for that as well but I couldn't find any.

Do I need to install third party plugins?

Thank you in advance for your help.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27426
  • Always on vacation
    • Jenkin Hill Internet
Re: Activating + - quantity adjustment when adding to cart
« Reply #1 on: March 25, 2019, 15:30:34 pm »
Template: TP Runway (I think)

You think?? The template used will be should named under Joomla Extensions/Templates  - some "developers" rename commercial templates to their own chosen name which is no help.

Quote
Overrides: not sure if there are any, where to check?

It is obvious that overrides are used - compare product details page with (for example)  http://demo.virtuemart.net/cap-baseball-detail

The override files should be found in Joomla root/templates/your-joomla-template/html/com_virtuemart/

The quantity change selector is part of the add to cart bar sublayout.  The default files should be at Joomla root/components/com_virtuemart/sublayouts/addtocartbar.php  but it is obviously overridden, the override file  should be found at   Joomla root/templates/your-joomla-template/html /com_virtuemart/sublayouts/addtocartbar.php  This override file has had the quantity change removed or commented out.

Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.4.3.10057 on Joomla 3.9.8 PHP 7.0.33
Testing VM .3.6.0.10075 on Joomla 3.9.8

zoki_ma

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Activating + - quantity adjustment when adding to cart
« Reply #2 on: March 26, 2019, 12:18:47 pm »
some "developers" rename commercial templates to their own chosen name which is no help.

That's exactly the case here, the template currently in use is called "masiva" which is the name of the store. I looked through the files and found an image, banner of sorts, which is a TP Runway promo, that's why I said that I think that's the template used.

This override file has had the quantity change removed or commented out.

Quantity selector was disabled in CSS, there was a div containing it that had "display: none" set. Trouble is that this CSS file was located in templates/masiva/local/css/themes/masiva/template.css. I read through the forum and found your suggestion of using Agent Ransack program to find files, and that's  how I managed to find this file. Not sure if putting stuff in that file is standard practice, but that's how people who put the shop together did it.

The only trouble now is that the buttons aren't visible on mobile apps. But I'm not sure that they are even needed there to be honest.

Thanks for the hlep.