Skip to content

Commit

Permalink
Merge pull request #1 from shail-mehta/version-1-1-2
Browse files Browse the repository at this point in the history
Updated Version 1.1.2
  • Loading branch information
shail-mehta authored Mar 24, 2024
2 parents b860514 + 0aaf334 commit 46fb12a
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 72 deletions.
9 changes: 0 additions & 9 deletions README.md

This file was deleted.

20 changes: 20 additions & 0 deletions assets/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,26 @@ a.button.wc-backward:hover {
background: transparent !important;
}

.add_to_cart_button{
width: 100%;
text-align: center;
}
.added_to_cart.wc-forward {
width: 100%;
text-align: center;
margin-left: 0px !important;
margin-top: 20px;
}

.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input:autofill + label, .woocommerce-checkout .wc-block-components-form .wc-block-components-text-input.is-active label, .woocommerce-checkout .wc-block-components-text-input input:autofill + label, .woocommerce-checkout .wc-block-components-text-input.is-active label
.woocommerce-checkout .wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label, .woocommerce-checkout .wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label, .woocommerce-checkout .wc-block-components-form .wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label, .woocommerce-checkout .wc-block-components-form .wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label
{
display: none;
}
.woocommerce-checkout .wc-block-components-address-form-wrapper input, .woocommerce-checkout .wc-block-components-address-form input{
height: 60px;
}

.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details {
padding-left: 0;
}
Expand Down
8 changes: 3 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
*/

if ( ! defined( 'bloggerwp_version' ) ) {

// Replace the version number of the theme on each release.
define( 'bloggerwp_version', '1.0.6' );

define( 'bloggerwp_version', '1.1.2' );
}

/* Theme Constants */
Expand Down Expand Up @@ -60,7 +58,7 @@ function bloggerwp_setup() {
'primary' => esc_html__( 'Primary', 'bloggerwp' ),
)
);
/* Adde Theme Support */
/* Add Theme Support */
add_theme_support('html5', array(
'search-form',
'comment-form',
Expand Down Expand Up @@ -245,4 +243,4 @@ function bloggerwp_options_scripts() {
}
add_action( 'wp_enqueue_scripts', 'bloggerwp_options_scripts' );
} ?>
<?php
<?php
18 changes: 16 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

Contributors: shailu25
Requires at least: 5.9
Tested up to: 6.3
Tested up to: 6.4
Requires PHP: 5.6
Stable tag: 1.0.7
Stable tag: 1.1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, custom-background, custom-logo, custom-menu, featured-images, one-column, two-columns, right-sidebar, theme-options

Bloggerwp theme is lightweight Responsive theme. it supports Gutenberg Editor, custom logo, menu, page, post, custom background color , widgets , custom copyright text, Right Click Prevent Option & Woocommerce.

Expand All @@ -28,6 +29,19 @@ Yes

== Changelog ==

= 1.1.2 =
* Updated Woocommerce Cart Template & Some styles

= 1.1.0 =
* Updated Tags

= 1.0.9 =
* Updated Tags in style.css & style-rtl.css

= 1.0.8 =
* Enhancement – Compatibility updated for WordPress 6.4
* Updated Tags

= 1.0.7 =
* Enhancement – Compatibility updated for WordPress 6.3

Expand Down
7 changes: 4 additions & 3 deletions style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ Theme Name: Bloggerwp
Author: Shail Mehta
Author URI: https://github.com/shail-mehta/
Description: Bloggerwp theme is lightweight Responsive theme.
Version: 1.0.7
Tested up to: 6.3
Version: 1.1.2
Tested up to: 6.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: bloggerwp
Tags: custom-background, custom-logo, custom-menu, featured-images
Tags: blog, custom-background, custom-logo, custom-menu, featured-images, one-column, two-columns, right-sidebar, theme-options
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
Expand Down
6 changes: 3 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Theme Name: Bloggerwp
Author: Shail Mehta
Author URI: https://github.com/shail-mehta/
Description: Bloggerwp theme is lightweight Responsive theme.
Version: 1.0.7
Tested up to: 6.3
Version: 1.1.2
Tested up to: 6.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: bloggerwp
Tags: custom-background, custom-logo, custom-menu, featured-images
Tags: blog, custom-background, custom-logo, custom-menu, featured-images, one-column, two-columns, right-sidebar, theme-options
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
Expand Down
114 changes: 64 additions & 50 deletions woocommerce/cart/cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @see https://woo.com/document/template-structure/
* @package WooCommerce\Templates
* @version 7.5.1
* @version 7.9.0
*/

defined( 'ABSPATH' ) || exit;

do_action( 'woocommerce_before_cart' ); ?>
<div class="container">
<form class="woocommerce-cart-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
Expand All @@ -25,8 +26,7 @@
<thead>
<tr>
<th class="product-remove"><span class="screen-reader-text"><?php esc_html_e( 'Remove item', 'bloggerwp' ); ?></span></th>
<th class="product-thumbnail"><span class="screen-reader-text"><?php esc_html_e( 'Thumbnail image', 'bloggerwp' ); ?></span>
</th>
<th class="product-thumbnail"><span class="screen-reader-text"><?php esc_html_e( 'Thumbnail image', 'bloggerwp' ); ?></span></th>
<th class="product-name"><?php esc_html_e( 'Product', 'bloggerwp' ); ?></th>
<th class="product-price"><?php esc_html_e( 'Price', 'bloggerwp' ); ?></th>
<th class="product-quantity"><?php esc_html_e( 'Quantity', 'bloggerwp' ); ?></th>
Expand All @@ -40,31 +40,40 @@
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
/**
* Filter the product name.
*
* @since 2.1.0
* @param string $product_name Name of the product in the cart.
* @param array $cart_item The product in the cart.
* @param string $cart_item_key Key for the product in the cart.
*/
$product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key );

if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
$product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
?>
<tr
class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
<tr class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">

<td class="product-remove">
<?php
<td class="product-remove">
<?php
echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'woocommerce_cart_item_remove_link',
sprintf(
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>',
esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
esc_html__( 'Remove this item', 'bloggerwp' ),
/* translators: %s is the product name */
esc_attr( sprintf( __( 'Remove %s from cart', 'bloggerwp' ), wp_strip_all_tags( $product_name ) ) ),
esc_attr( $product_id ),
esc_attr( $_product->get_sku() )
),
$cart_item_key
);
?>
</td>
</td>

<td class="product-thumbnail">
<?php
<td class="product-thumbnail">
<?php
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );

if ( ! $product_permalink ) {
Expand All @@ -73,13 +82,18 @@ class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woo
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ); // PHPCS: XSS ok.
}
?>
</td>
</td>

<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'bloggerwp' ); ?>">
<?php
<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'bloggerwp' ); ?>">
<?php
if ( ! $product_permalink ) {
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . '&nbsp;' );
echo wp_kses_post( $product_name . '&nbsp;' );
} else {
/**
* This filter is documented above.
*
* @since 2.1.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) );
}

Expand All @@ -93,43 +107,47 @@ class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woo
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'bloggerwp' ) . '</p>', $product_id ) );
}
?>
</td>
</td>

<td class="product-price" data-title="<?php esc_attr_e( 'Price', 'bloggerwp' ); ?>">
<?php
<td class="product-price" data-title="<?php esc_attr_e( 'Price', 'bloggerwp' ); ?>">
<?php
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
?>
</td>
</td>

<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'bloggerwp' ); ?>">
<?php
<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'bloggerwp' ); ?>">
<?php
if ( $_product->is_sold_individually() ) {
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
$min_quantity = 1;
$max_quantity = 1;
} else {
$product_quantity = woocommerce_quantity_input(
array(
'input_name' => "cart[{$cart_item_key}][qty]",
'input_value' => $cart_item['quantity'],
'max_value' => $_product->get_max_purchase_quantity(),
'min_value' => '0',
'product_name' => $_product->get_name(),
),
$_product,
false
);
$min_quantity = 0;
$max_quantity = $_product->get_max_purchase_quantity();
}

$product_quantity = woocommerce_quantity_input(
array(
'input_name' => "cart[{$cart_item_key}][qty]",
'input_value' => $cart_item['quantity'],
'max_value' => $max_quantity,
'min_value' => $min_quantity,
'product_name' => $product_name,
),
$_product,
false
);

echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); // PHPCS: XSS ok.
?>
</td>
</td>

<td class="product-subtotal" data-title="<?php esc_attr_e( 'Subtotal', 'bloggerwp' ); ?>">
<?php
<td class="product-subtotal" data-title="<?php esc_attr_e( 'Subtotal', 'bloggerwp' ); ?>">
<?php
echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
?>
</td>
</tr>
<?php
</td>
</tr>
<?php
}
}
?>
Expand All @@ -140,17 +158,13 @@ class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woo
<td colspan="6" class="actions">

<?php if ( wc_coupons_enabled() ) { ?>
<div class="coupon">
<input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'bloggerwp' ); ?>" />
<button type="submit" class="bloggerwp_apply_coupon_btn button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'bloggerwp' ); ?>"><?php esc_html_e( 'Apply coupon', 'bloggerwp' ); ?></button>
<?php do_action( 'woocommerce_cart_coupon' ); ?>
</div>
<div class="coupon">
<label for="coupon_code" class="screen-reader-text"><?php esc_html_e( 'Coupon:', 'bloggerwp' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'bloggerwp' ); ?>" /> <button type="submit" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'bloggerwp' ); ?>"><?php esc_html_e( 'Apply coupon', 'bloggerwp' ); ?></button>
<?php do_action( 'woocommerce_cart_coupon' ); ?>
</div>
<?php } ?>

<button type="submit"
class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>"
name="update_cart"
value="<?php esc_attr_e( 'Update cart', 'bloggerwp' ); ?>"><?php esc_html_e( 'Update cart', 'bloggerwp' ); ?></button>
<button type="submit" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="update_cart" value="<?php esc_attr_e( 'Update cart', 'bloggerwp' ); ?>"><?php esc_html_e( 'Update cart', 'bloggerwp' ); ?></button>

<?php do_action( 'woocommerce_cart_actions' ); ?>

Expand Down Expand Up @@ -178,4 +192,4 @@ class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' )
?>
</div>
</div>
<?php do_action( 'woocommerce_after_cart' ); ?>
<?php do_action( 'woocommerce_after_cart' ); ?>

0 comments on commit 46fb12a

Please sign in to comment.