0

I have a question about something I do not understand what comes from this topic: hide-the-qty-box-in-bundle-product

I want to apply Method 1, which is very simple, but I totally do not understand. In which file, in which location, I can add the indicated piece of text.

And what do I have to do to make this work? (is that what is stated in "note", I understand that piece :))

Thank you for helping.

edit:

For more clarity: If you make a bundle product, you will see quantity boxes on the front page. This is totally unnecessary and I would like to hide.

I have found the right file: _custom.less I found it in

app/design/frontend/Infortis/ultimo/web/css/_custom.less

in _custom.less i put the code:

.bundle-options-container .nested .field.qty:last-child
{
    display : none;
}

The file has correct file permissions (777 to be sure)

With Putty I gave the following commands:

php bin/magento setup:static-content:deploy -f
php bin/magento setup:static-content:deploy nl_NL -f
php bin/magento cache:flush

In my browser I have emptied the cache. Unfortunately no result.

  • Do you ever develop a Magento module or design ? – Vinz Mar 6 '19 at 16:26
  • Have a look at this reply, it is very similar to what you are looking for: magento.stackexchange.com/a/108690/30971 – Nicola Lepetit Mar 6 '19 at 17:06
  • @Vinz No, I have not done that before. NicolaLepetit Tnx for your url. Meanwhile, I have invented that it is: /app/design/frontend/Infortis/ultimo/web/css/_custom.less I have placed: 'code' .bundle-options-container .nested .field.qty: last-child { display: none; } and: 'code' php bin / magento setup: static-content: deploy -f and the cache emptied. Unfortunately no visible result. – Ton Geurts Mar 6 '19 at 19:28
  • Ok. Do you use a custom theme or the magento native ? – Vinz Mar 6 '19 at 19:35
  • @Vinz i use the template Infortis Ultimo. – Ton Geurts Mar 7 '19 at 8:30
0

So, one of the cleanest way to do it is to create a theme with Infortis Ultimo as parent.

Create a theme.xml in app/design/frontend/Vendor/default Contains :

<theme xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd”>
    <title>Vendor Theme</title>
    <parent>Infortis/ultimo</parent>
</theme>

Create a registration.php in the same folder. Contains :

<?php

use Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::THEME, 'frontend/Vendor/default', __DIR__);

Now in app/design/frontend/Vendor/default/web/css you can create your _custom.less file and add your code :

.bundle-options-container .nested .field.qty:last-child
{
    display : none;
}

Now launch commands :

sudo php bin/magento cache:clean

sudo php bin/magento setup:static-content:deploy

Don't forget to set your new theme on your store.

0

You have no idea how happy I am with your help!

I get the following message

php bin / magento setup: static-content: deploy -f

Deploy using quick strategy

In ErrorHandler.php line 61:

   Warning: DOMDocument :: loadXML (): AttValue: "or" expected in Entity, line:
    1 in /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/fra
   mework / Config / Theme.php on line 76

On the first line is:

<theme xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: noNamespaceSchemaLocation = "../../../../ lib / internal / Magento / Framework / Config / etc / theme.xsd ">

The path might be?:

Edit 14:54 uur: Have I tried, that's not it :)

/domains/orionyx.org/public_html/vendor/magento/framework/Config/etc/theme.xds

And, if I go to /admin to log in, I get this to be done instead of the usual login screen:

1 exception(s):
Exception #0 (Exception): Warning: DOMDocument::loadXML(): AttValue: &quot; or ' expected in Entity, line: 1 in /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Config/Theme.php on line 76

Exception #0 (Exception): Warning: DOMDocument::loadXML(): AttValue: &quot; or ' expected in Entity, line: 1 in /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Config/Theme.php on line 76
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'DOMDocument::lo...', '/home/u36619p31...', 76, Array)
#1 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Config/Theme.php(76): DOMDocument->loadXML('<theme xmlns:xs...')
#2 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Config/Theme.php(46): Magento\Framework\Config\Theme->_extractData('<theme xmlns:xs...')
#3 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(116): Magento\Framework\Config\Theme->__construct(Object(Magento\Framework\Config\Dom\UrnResolver), '<theme xmlns:xs...')
#4 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#5 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...', Array)
#6 /home/u36619p31939/domains/orionyx.org/public_html/generated/code/Magento/Framework/Config/ThemeFactory.php(43): Magento\Framework\ObjectManager\ObjectManager->create('\\Magento\\Framew...', Array)
#7 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/View/Design/Theme/ThemeList.php(307): Magento\Framework\Config\ThemeFactory->create(Array)
#8 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/View/Design/Theme/ThemeList.php(232): Magento\Framework\View\Design\Theme\ThemeList->_getConfigModel(Object(Magento\Framework\View\Design\Theme\ThemePackage))
#9 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/View/Design/Theme/ThemeList.php(200): Magento\Framework\View\Design\Theme\ThemeList->_prepareConfigurationData(Object(Magento\Framework\View\Design\Theme\ThemePackage))
#10 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/View/Design/Theme/ThemeList.php(161): Magento\Framework\View\Design\Theme\ThemeList->_loadFromFilesystem(Array)
#11 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Data/Collection.php(689): Magento\Framework\View\Design\Theme\ThemeList->loadData(false, false)
#12 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Data/Collection.php(832): Magento\Framework\Data\Collection->load()
#13 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/module-theme/Model/Theme/Registration.php(72): Magento\Framework\Data\Collection->getIterator()
#14 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/module-theme/Model/Theme/Plugin/Registration.php(84): Magento\Theme\Model\Theme\Registration->register()
#15 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Theme\Model\Theme\Plugin\Registration->beforeDispatch(Object(Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor), Object(Magento\Framework\App\Request\Http))
#16 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#17 /home/u36619p31939/domains/orionyx.org/public_html/generated/code/Magento/Backend/Controller/Adminhtml/Index/Index/Interceptor.php(26): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#18 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/App/FrontController.php(159): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/App/FrontController.php(99): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor))
#20 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#22 /home/u36619p31939/domains/orionyx.org/public_html/app/code/Infortis/Cgen/Plugin/Magento/Framework/App/FrontController.php(32): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#23 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Infortis\Cgen\Plugin\Magento\Framework\App\FrontController->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#24 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#25 /home/u36619p31939/domains/orionyx.org/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#26 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#27 /home/u36619p31939/domains/orionyx.org/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#28 /home/u36619p31939/domains/orionyx.org/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#29 {main}

I'm going back up restore :)

Edit

Restoring the back-up has not done anything. I have removed the created 'Vendor' folder, which ensures that I can log in again.

  • Just be sure that in theme.xml the copy paste don't brake the double quote " or quote ' – Vinz Mar 8 '19 at 16:50
0

Also be sure that you didn't accidentally cut and paste magic quote characters. Look at all the double quotes and make sure they don't look angled. If they do, select them and type a double quote character over it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.