You've already forked wc-tier-and-package-prices
Release version 1.1.7 - Enhanced user experience features
Added three new customer-facing features to improve product page interaction and tier pricing functionality. Features: - Optional text labels for tier pricing (similar to package labels) - Clickable tier pricing table rows to auto-populate quantity field - Add to Cart button auto-disables when quantity is 0 or less Enhanced User Experience: - Tier pricing rows now clickable with cursor pointer and hover animation - Clicking tier row sets quantity and smoothly scrolls to quantity field - Add to Cart button shows disabled state with reduced opacity - Tier labels display below quantity in italic gray text Technical Changes: - Added optional 'label' field to tier pricing admin meta box - Updated tier save logic to include label field (sanitized) - Enhanced tier pricing frontend template to display labels - Added click handler for tier pricing rows in frontend.js - Added updateAddToCartButton() function to manage button state - CSS: .wc-tpp-tier-label styling for tier labels - CSS: Clickable cursor and hover transform for tier rows - CSS: Disabled button styling (.single_add_to_cart_button:disabled) Updated Files: - templates/admin/tier-row.twig (added label field) - includes/class-wc-tpp-product-meta.php (save label, template update) - templates/frontend/tier-pricing-table.twig (display labels) - assets/js/frontend.js (tier row clicks, button disable logic) - assets/css/frontend.css (tier label style, clickable rows, disabled button) - wc-tier-and-package-prices.php (version 1.1.7) - composer.json (version 1.1.7) - CHANGELOG.md (v1.1.7 section) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,11 +50,13 @@
|
||||
|
||||
.wc-tpp-table tbody tr {
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
transition: background-color 0.2s;
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wc-tpp-table tbody tr:hover {
|
||||
background: #f5f5f5;
|
||||
transform: translateX(2px);
|
||||
}
|
||||
|
||||
.wc-tpp-table tbody tr.wc-tpp-active-tier {
|
||||
@@ -67,6 +69,14 @@
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
.wc-tpp-tier-label {
|
||||
display: inline-block;
|
||||
margin-top: 4px;
|
||||
color: #666;
|
||||
font-style: italic;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* Package pricing */
|
||||
.wc-tpp-packages {
|
||||
display: grid;
|
||||
@@ -209,6 +219,14 @@ a.wc-tpp-view-options:hover {
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
/* Disabled add to cart button */
|
||||
.single_add_to_cart_button.disabled,
|
||||
.single_add_to_cart_button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Responsive design */
|
||||
@media (max-width: 768px) {
|
||||
.wc-tpp-packages {
|
||||
|
||||
Reference in New Issue
Block a user