forked from isabelc/WooCommerce-Show-Attributes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
executable file
·210 lines (139 loc) · 10.3 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
=== WooCommerce Show Attributes ===
Contributors: isabel104
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40isabelcastillo%2ecom
Tags: custom product attributes, woocommerce product attributes, product attributes, custom attributes, woocommerce custom product attributes
Requires at least: 3.8
Tested up to: 4.7
Stable tag: 1.5.2
License: GNU Version 2 or Any Later Version
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Show WooCommerce custom product attributes on the Product, Shop, and Cart pages, admin Order Details page and emails.
== Description ==
This is an extension for WooCommerce that will show your custom product attributes on the single product page above the "Add to cart" button instead of in the "Additional Information" tab. This does NOT affect nor include attributes which are used for Variations.
The custom product product attributes will **also** be displayed at these locations (with option to turn them off):
* Grouped product page
* Shop page (including product category and tag archives) (Off by default. You must enable this option.)
* Cart page
* View Order page on front end for customers
* Emails that goes to the customer, including:
* Receipt (Order Processing) email that goes to the customer
* Order Complete email that goes to the customer
* Customer Invoice email
* New Order email that goes to the administrator
* Admin Order Details page on the back end, under Order Items
Includes a .pot localization file to make this plugin WPML-ready. Also includes language translations files for the Finnish language.
See the [documentation](http://isabelcastillo.com/docs/category/woocommerce-show-attributes).
Fork it [on GitHub](https://github.com/isabelc/WooCommerce-Show-Attributes).
== Installation ==
**Install and Activate**
1. Install and activate the plugin in your WordPress dashboard by going to Plugins –> Add New.
2. Search for “WooCommerce Show Attributes” to find the plugin.
3. When you see WooCommerce Show Attributes, click “Install Now” to install the plugin.
4. Click “Activate” to activate the plugin.
**Setup**
1. After you activate the plugin, your custom product attributes will automatically be shown at certain locations. ([see which locations](https://isabelcastillo.com/docs/getting-started)).
2. If you want to show the attributes on the single product page, do this: For each attribute that you want to display, you must check the box for “Visible on the product page.” This is a WooCommerce native option and is found on the Edit Product page (for each product), under the individual attribute settings. If you uncheck that box, the attribute will not be shown for that product.
3. Optional settings are at WooCommerce Settings -> Products tab. Click on "WC Show Attributes" to see this plugin's options.
== Frequently Asked Questions ==
= How do I show only some attributes, while not showing others? =
For each attribute that you want to display, you must check the box for “Visible on the product page.” So, you can use that setting to show some attributes. Leave the box unchecked for the attributes that you do not want to show.
= Why are my custom attributes NOT showing up? =
For each attribute that you want to display, you must check the box for “Visible on the product page.” If you leave that box unchecked, that attribute will not be shown by this plugin.
= Can I show the product weight and/or dimensions above the Add to Cart button? =
Yes, since version 1.4.0. See this plugin's settings page to enable this.
= How do I hide the attribute labels and only show the values? =
Go to WooCommerce Settings -> Product tab, under "Product Data". Check the box for **"Hide the Labels When Showing Product Attributes"**. Click "Save changes".
= How do I remove the list bullets from the attributes on the single product page? =
Go to WooCommerce Settings -> Product tab, under "Product Data". Check the box for **"Show Attributes in a span Element"**. Click "Save changes".
= How can I style the attributes? =
This plugin adds several CSS selectors so that you can style the output by adding your own CSS.
On the "single product page", the attributes are in an unordered list with the CSS class "custom-attributes". Each list item has two CSS classes: its attribute name and its value. Within each list item, each attribute label has the CSS class "attribute-label", and each attribute value has the CSS class "attribute-value".
On the Cart page, View Order page, admin Edit Order page, and in the emails, the attributes are wrapped in a 'span' element with the CSS class "custom-attributes". Each attribute name and value pair is wrapped in a 'span' which has two CSS classes: its attribute name and its value. Within this span, each attribute label has the CSS class "attribute-label", and each attribute value has the CSS class "attribute-value".
= How do I remove the extra left-margin space from the attributes on the single product page? =
Add this CSS:
`ul.custom-attributes {
margin-left: 0;
}`
= How do I make all the attribute labels bold? =
Add this CSS:
`.custom-attributes .attribute-label {
font-weight: bold;
}`
= How do I make all the labels and values italic? =
Add this CSS:
`.custom-attributes {
font-style:italic
}`
== Screenshots ==
1. The attributes under the product name on the Edit Order page in the admin backend.
2. The attributes under the product name on the Cart page.
3. The attributes under the product name on the Customer's Order Details page on the front end.
== Changelog ==
= 1.5.2 =
* Fix - Improve use of get_current_screen since it returns NULL in some cases.
= 1.5.1 =
* Fix - Removed attributes from the admin main Orders page because it was ruining the HTML for the item names.
= 1.5 =
* Fix - Fixed one possible incompatibility with plugins that manage custom Woocommerce Tabs.
* Fix - Blank tab no longer appears if a shop item has at one attribute that enables Used For Variations.
* Localization - Fixed an error that prevented several strings from being translated.
* Localization - Translate attribute values, as well. Previously, only attribute labels where translated, but not values, since values are user-created.
* Localization - Added Finnish language translation. Thanks to Arhi Paivarinta.
* Tweak - Display adjustments - Separated .attribute-label from the colon by wrapping the label's content in another span element. Removed the space before the colon. Removed obsolete white space. Thanks to amielucha.
= 1.4.2 =
* New - The attribute values in the emails are now vertically aligned.
* New - New option to show attribute terms as links. This only applies to Global Attributes. Global Attributes are created in Products -> Attributes.
* Fix - Output attributes as comma separated list instead of separate lines.
* Fix - Weight and Dimensions would not show up in locations enabled by the settings, unless the option the Show Attributes in that location was also enabled.
= 1.4.1 =
* Fix - Avoid PHP errors when calling get_attributes.
= 1.4.0 =
* New - 16 new options are available to give you more granular control over where to show the attributes.
* New - The options have moved to their own page at WooCommerce Settings, Products tab, click on "WC Show Attributes" to see all the options.
* New - Options to show the product weight and dimensions in various places.
* Fix - Attributes were displayed on the Cart page even though the setting to make an attribute visible was unchecked.
* Maintenance - Updated .pot translation file.
= 1.3.1 =
* Fix - Fixed a fatal error that was breaking the Additional Information tab.
* Tweak - Translate attribute labels.
= 1.3 =
* Fix - Removed an error that caused installation to fail.
* New - Added a .pot localization file to make the plugin WPML ready.
= 1.2.5=
* Fix - Fixed a fatal error on the admin Edit Order page, above the item details. Please update.
= 1.2.4 =
* New - Show the attributes also on the Grouped product page, for each child product in the Grouped product.
= 1.2.3 =
* New - Option to show the attributes on the shop pages, which also includes the product category and tag archives.
* Fix - Typo in the description of one setting.
* Maintenance: Updated plugin URI and added link to new Documentation.
= 1.2.2 =
* Fix - Attribute labels were temporarily hidden leaving only the attribute value showing in version 1.2.1.
= 1.2.1 =
* New - The "Visible on the product page" checkbox for each individual product will now be taken in to account on the single product page. If you uncheck that box, then the attribute will not be shown on the single product page. However, it will still show up on the rest of the places as described in the plugin description.
* New - Easily remove list bullets from the attributes on the single product page with the new option, "Show Attributes in a span Element". The new option can be found on the WooCommerce Settings Product tab, under "Product Data".
* New - Easily hide the labels and show only the values with the new option. The new option can be found on the WooCommerce Settings Product tab, under "Product Data".
* Fix - Check for WP_ERROR when using wp_get_post_terms.
= 1.2 =
* New - Custom attributes now also appear on the Cart page, on the View Order page on front end for customers, on the Edit Order admin page under Order Items, on the New Order email that goes to the administrator, on the Receipt (Order Processing) email that goes to the customer, and on the Order Complete email that goes to the customer.
= 1.1 =
* Fix - fixed logic for removing our custom product attributes from the Additional Information tab.
= 1.0 =
* Initial release.
== Upgrade Notice ==
= 1.5.2 =
Fix - Improve use of get_current_screen since it returns NULL in some cases.
= 1.5.1 =
Fix - Removed attributes from the admin main Orders page because it was ruining the HTML for the item names.
= 1.4.1 =
Fix - Avoid PHP errors when calling get_attributes.
= 1.4.0 =
16 new options are available to give you more control over where to show the attributes.
= 1.2.5 =
Fixed a Fatal Error on the admin Edit Order page.
= 1.2.3 =
New option to show attributes on the shop pages, which also includes the product category and tag pages.
= 1.2.2 =
Fix - Attribute labels were temporarily hidden leaving only the attribute value showing in version 1.2.1.
= 1.2 =
New - Custom attributes now also appear on the Cart, View Order, admin Edit Order page, and in emails.