Blog

Get Variation ID By Attribute

User How to get variation id based on if ($attribute->is_taxonomy()) { $terms = wc_get_product_terms($product_id, $attr_name, ['fields' => 'names']); foreach ($terms as $term) { $filterOption .= '' . esc_html($term) . ''; } } attr term value Assistant To get the **variation ID** based on the selected attribute term value, you need to match the attribute term […]

HTML Entity Conversion

User _legheight_field 7/8" convert 7/8" to 7/8" when get_post_meta Assistant When retrieving the `_legheight_field` meta value using `get_post_meta()`, you need to replace `"` (which is the HTML entity for `"` double quote) with the actual `"` character. You can use `html_entity_decode()` in PHP to achieve this. ### Solution: $legheight = get_post_meta($post_id, '_legheight_field', true); $legheight = […]

Hide Datalist on Hover

User hide datalist by default on hover arrow drodown Assistant To hide a “ by default and only show it when interacting with an associated “ or when hovering over an arrow dropdown, you can use CSS and JavaScript. Here's a simple way to achieve this: ### **Approach** – Hide the “ by default. – […]

Firebase Token Laravel API

User const getFirebaseToken = async (provider:string) => { try { // Sign in with Google or GitHub const result = provider === "google" ? await signInWithGoogle() : await signInWithGithub(); //console.log(result); // Get Firebase ID token const idToken = await result.user.getIdToken(); console.log(result.user.displayName, result.user.email, result.user.photoURL, result.user.uid); const userData = { name: result.user.displayName, email: result.user.email, avatar: result.user.photoURL, firebase_uid: […]

Google GitHub Login Vue 3

User google/github login vue 3 js Assistant To integrate Google and GitHub login in a **Vue 3** application, you can use Firebase Authentication or implement OAuth 2.0 manually. Below are both approaches. — ## **1. Using Firebase Authentication (Recommended)** Firebase makes it easy to integrate social logins like Google and GitHub. ### **Step 1: Setup […]

Firebase Token to Laravel

User const getFirebaseToken = async (provider:string) => { try { // Sign in with Google or GitHub const result = provider === "google" ? await signInWithGoogle() : await signInWithGithub(); // Get Firebase ID token const idToken = await result.user.getIdToken(); // Log or return the token console.log("Firebase ID Token:", result.user); await nextTick(); router.push('/register'); return idToken; } […]

Firebase Login Issues

User we have successfully get respinse from firebase <script> import { ref,inject,onMounted } from "vue"; import { useForm, useField } from 'vee-validate' import { useAuthStore } from '@/stores/auth'; import { useRouter } from 'vue-router'; import publicApi from '@/publicApi'; import SingleColumn from '@/layouts/SingleColumn.vue'; import {signInWithGoogle, signInWithGithub} from '@/firebase'; import { useLoadingStore } from '@/stores/loading'; import { […]

Vuetify COOP Firebase Error

User <script> import { ref,inject,onMounted } from "vue"; import { useForm, useField } from 'vee-validate' import { useAuthStore } from '@/stores/auth'; import { useRouter } from 'vue-router'; import publicApi from '@/publicApi'; import SingleColumn from '@/layouts/SingleColumn.vue'; import {signInWithGoogle, signInWithGithub} from '@/firebase'; import { useLoadingStore } from '@/stores/loading'; import { nextTick } from "vue"; const loadingStore = […]

Overlay Loading Management

User we have overlay component add in common layout and run from any view where loading is true Assistant If you have an `OverlayLoading` component inside a common layout and it runs whenever `loading` is `true`, but you need to control it from any view, you have a few ways to manage it globally in […]

Uses of Firebase

User What is the use of firebase Assistant Firebase is a **backend-as-a-service (BaaS)** platform developed by Google that helps developers build, improve, and scale web and mobile applications. It provides a suite of tools and services for backend development, eliminating the need for managing servers manually. ### **Key Uses of Firebase** 1. **Real-time Database & […]