| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Hiding product weights and inventory quantities | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||||
|
|||||||||
Re: Hiding product weights and inventory quantities
The weight is displayed by this template file:
skins/default/en/shopping_cart/parts/item.info.weight.tpl If you check the file, it has the @ListChild directive that says that the template must be shown in the "cart.item.info" list. So, to removing the template from that list should be enough to hide the weight in the shopping cart. I haven't tested the following code, but creating a custom module and adding the following method to your Main.php (or doing the same for Custom Skin module) should work: PHP Code:
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#12
|
|||||||
|
|||||||
Re: Hiding product weights and inventory quantities
This is how I hide stock quantities - I don't want my competitors knowing how much inventory I keep.
1) Look&Feel>>Webmaster mode 2) Edit Template: /default/en/product/details/stock/body.tpl Comment out the quantity tag using {** *} here is the template: ================================================ {* vim: set ts=2 sw=2 sts=2 et: *} {** * Product stock * * @author Qualiteam software Ltd <info@x-cart.com> * @copyright Copyright (c) 2011-2015 Qualiteam software Ltd <info@x-cart.com>. All rights reserved * @license http://www.x-cart.com/license-agreement.html X-Cart 5 License Agreement * @link http://www.x-cart.com/ *} <div class="product-stock {getFingerprint()}"> {if:isInStock()} <span class="stock-level product-in-stock"> <span class="in-stock-label">{t(#In stock#)}</span> {** <span class="product-items-available">({t(#X items available#,_ARRAY_(#count#^getAvailableAmount()))} )</span> *} </span> {else:} {if:isOutOfStock()} <span class="stock-level product-out-of-stock">{getOutOfStockMessage()}</span> {end:} {end:} </div>
__________________
X-Cart 5.4.1.39 Live PHP 7.4.33 5.5.5-10.3.38-MariaDB MariaDB Apache 2.4 CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT 32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1 |
|||||||
#13
|
|||||||
|
|||||||
Re: Hiding product weights and inventory quantities
What about hiding JUST the weight and keeping the SKU?
Would this work? .product-details .extra-fields { display: weight; }
__________________
x-cart v5.3.3.4 Shared Linux server we specialize in hosting for non-profits no special modules added - trying to see how vanilla works first |
|||||||
#14
|
|||||||
|
|||||||
Re: Hiding product weights and inventory quantities
Quote:
/skins/**your-custom-module**/customer/product/details/stock/body.twig for stock levels /skins/**your-custom-module**/customer/product/details/common_attributes/common.product-attributes.weight.twig for weights And if you needed to modify the sku display, that's here too: /skins/**your-custom-module**/customer/product/details/common_attributes/common.product-attributes.sku.twig
__________________
Dev Store & Live Store XC Business 5.4.1.35 Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33 |
|||||||
#15
|
|||||||
|
|||||||
Re: Hiding product weights and inventory quantities
__________________
Sincerely yours, Max Vydrin |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|