J
J
Jack London2016-11-03 15:13:42
WordPress
Jack London, 2016-11-03 15:13:42

How to change the appearance of the shopping cart in the storefront theme?

Good day! Can you tell me how to change the appearance of the shopping cart in the storefront theme?
I go into the storefront/inc/woocommerce/storefront-woocommerce-template-functions.php theme file and try to fix the storefront_cart_link() function to display the cart differently on the page, but nothing changes, even the banal characters "(" and ")" inserting fails, they appear for a second and then disappear or are overwritten somewhere, what could it be?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Vorotnev, 2016-11-03
@HeadOnFire

It uses a WooCommerce cart, which is also updated by Ajax (hence the overwrite). There is a templates folder in the WooCommerce plugin folder. Copy it to your theme folder and name it woocommerce. And there already edit all the templates as much as you like. If I understand correctly, you need a template templates/cart/mini-cart.php

S
Sergey Semenko, 2017-01-16
@abler98

All observers for changes in the users array are registered in observers, so when adding / removing (possibly also during other operations) an element of the array, the usersAddedOrRemoved method is called, which contains information about changes: indexSplices - an array of objects that have the following properties: index, removed, addedCount, object, type.
In this code , the changeRecord.indexSplices.forEach(function(s) {value of s contains the properties listed above, i.e. this is an element of the indexSplices array (read the forEach documentation if it's not clear https://developer.mozilla.org/ru/docs/Web/JavaScri... )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question