You've already forked wc-tier-and-package-prices
Release version 1.1.2 - Catalog button modification
Enhanced package quantity restriction enforcement by replacing "Add to Cart" buttons with "View Options" links on catalog pages for products with quantity restrictions. This prevents customers from attempting to add restricted products directly from shop/category pages. Changes: - Added catalog button modification for restricted products - Implemented "View Options" button with eye icon styling - Created has_quantity_restriction() helper method - Extended CSS loading to all WooCommerce pages - Added modify_catalog_add_to_cart_button() filter method - Updated translations with 2 new strings (en_US, de_DE, de_CH_informal) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -156,6 +156,45 @@
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Catalog "View Options" button */
|
||||
a.wc-tpp-view-options {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
line-height: 1.5;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
a.wc-tpp-view-options::before {
|
||||
content: "\f06e";
|
||||
font-family: "dashicons";
|
||||
margin-right: 5px;
|
||||
display: inline-block;
|
||||
font-size: 1.1em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Cart quantity display for restricted products */
|
||||
.wc-tpp-cart-quantity {
|
||||
display: inline-block;
|
||||
padding: 5px 10px;
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 3px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Restriction notice */
|
||||
.wc-tpp-restriction-notice {
|
||||
padding: 10px 15px;
|
||||
background: #fff3cd;
|
||||
border: 1px solid #ffc107;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 15px;
|
||||
color: #856404;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
/* Responsive design */
|
||||
@media (max-width: 768px) {
|
||||
.wc-tpp-packages {
|
||||
|
||||
Reference in New Issue
Block a user