Skip to content

Commit

Permalink
feat(admin-ui): instruction and link update
Browse files Browse the repository at this point in the history
In this commit the doc instruction is added for the following modules
stock bar
Free Shipping Bar
Direct Checkout

and also the refund policy link also being updated.

resolves: Admin UI: uasge instruction #322
  • Loading branch information
satyajittalukder committed Nov 16, 2023
1 parent fce0ee3 commit 762de1f
Show file tree
Hide file tree
Showing 9 changed files with 199 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/src/components/dashboard/Gaurantee.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Gaurantee = () => {
<Image preview={false} width={200} src={GaraunteeBadge} />
<h4>Without Any Question</h4>
<h6>
<a href="https://storegrowth.io/privacy-policy/" target="_blank">
<a href="https://storegrowth.io/refund-policy/" target="_blank">
Terms & Condition
</a>
</h6>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { useDispatch, useSelect } from "@wordpress/data";
import TextInput from "../../../../../../assets/src/components/settings/Panels/PanelSettings/Fields/TextInput";
import CheckboxGroup from "../../../../../../assets/src/components/settings/Panels/PanelSettings/Fields/CheckboxGroup";
import SingleCheckBox from "../../../../../../assets/src/components/settings/Panels/PanelSettings/Fields/SingleCheckBox";
import SelectBox from "../../../../../../assets/src/components/settings/Panels/PanelSettings/Fields/SelectBox";
import SettingsSection from "../../../../../../assets/src/components/settings/Panels/PanelSettings/SettingsSection";
import ActionsHandler from "sales-booster/src/components/settings/Panels/PanelSettings/ActionsHandler";
import { createDirectCheckoutForm } from "../helper";
import SettingInstruction from "./SettingInstruction";

function General({ onFormSave, upgradeTeaser }) {
const modulePageRedirect = () => {
Expand Down Expand Up @@ -127,6 +127,10 @@ function General({ onFormSave, upgradeTeaser }) {
headColSpan={9}
checkboxColSpan={15}
/>

{createDirectCheckoutFormData.buy_now_button_setting ===
"specific-buy-now" && <SettingInstruction />}

<CheckboxGroup
name={"checkout_redirect"}
options={checkoutPageOptions}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import Image from "antd/es/image";
import scInstruction from "../../images/direct-checkout-instruction.png";
import FieldWrapper from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/FieldWrapper";

const SettingInstruction = () => {
return (
<FieldWrapper colSpan={24} justify={`start`}>
<div>
<p>
To be able to direct checkout of a specific product must go to{" "}
<a href={`/wp-admin/edit.php?post_type=product`}>
<strong>all products</strong>
</a>{" "}
in woocommerce. Then select a desired product to <b>Edit</b>. In the
product meta of woocommerce you will be able to see{" "}
<b>"Direct Checkout"</b>.
</p>
<Image preview={false} src={scInstruction} />
<div
style={{
marginTop: "10px",
}}
>
<p>
Explore full range of products{" "}
<a href={`/wp-admin/edit.php?post_type=product`}>
<strong>here</strong>
</a>
.
</p>
</div>
<div>
<button
style={{
backgroundColor: "#0875ff",
color: "#fff",
padding: "10px 20px",
border: "none",
borderRadius: "5px",
cursor: "pointer",
display: "block",
margin: "10px 0",
}}
onClick={() =>
window.open(
"https://storegrowth.io/docs/direct-checkout/",
"_blank"
)
}
>
Documentaion
</button>
</div>
</div>
</FieldWrapper>
);
};

export default SettingInstruction;
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ import Number from "../../../../../../assets/src/components/settings/Panels/Pane
import TextAreaBox from "../../../../../../assets/src/components/settings/Panels/PanelSettings/Fields/TextAreaBox";
import SettingsSection from "../../../../../../assets/src/components/settings/Panels/PanelSettings/SettingsSection";
import DisplayRules from "./DisplayRules";
// import SectionSpacer from "sales-booster/src/components/settings/Panels/PanelSettings/SectionSpacer";
// import RadioBox from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/RadioBox";
// import UploadIcon from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/UploadIcon";
// import CartIcon from "sales-booster-quick-cart/src/components/CartIcon";
import BarIcon from "./BarIcon";
import RadioBox from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/RadioBox";
import {wpMedia} from "sales-booster/src/utils/helper";
import SettingInstruction from "./SettingInstruction";

function DiscountBanner(props) {
const { formData, setFormData, onFieldChange, onIconChange, upgradeTeaser } = props;
Expand Down Expand Up @@ -138,6 +135,11 @@ function DiscountBanner(props) {
"storegrowth-sales-booster"
)}
/>

{formData.discount_type === "free-shipping" &&
<SettingInstruction/>
}

{formData.discount_type === "discount-amount" && (
<Fragment>
<SelectBox
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import FieldWrapper from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/FieldWrapper";

const SettingInstruction = () => {
return (
<FieldWrapper colSpan={24} justify={`start`}>
<div>
<p>
To set the free shipping method please go to{" "}
<b>
<a href={`/wp-admin/admin.php?page=wc-settings&tab=shipping`}>
<strong>Shipping</strong>
</a>
</b>{" "}
in woocommerce setting. Then add a{" "}
<b>
<a
href={`/wp-admin/admin.php?page=wc-settings&tab=shipping&zone_id=new`}
>
<strong>Shipping Zone</strong>
</a>{" "}
</b>
. In the shipping zone add the <b>"Shipping Method"</b> of{" "}
<b>"Free Shipping"</b> and set an conditional amount to avail the free
shipping.
</p>

<div
style={{
marginTop: "10px",
}}
>
<p>
For more please visit the{" "}
<a href={`https://woo.com/document/free-shipping/`} target="_blank">
<strong>Woocommerce Documentation</strong>
</a>
.
</p>
</div>
<div>
<button
style={{
backgroundColor: "#0875ff",
color: "#fff",
padding: "10px 20px",
border: "none",
borderRadius: "5px",
cursor: "pointer",
display: "block",
margin: "10px 0",
}}
onClick={() =>
window.open(
"https://storegrowth.io/docs/free-shipping-bar/",
"_blank"
)
}
>
Documentaion
</button>
</div>
</div>
</FieldWrapper>
);
};

export default SettingInstruction;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { __ } from "@wordpress/i18n";
import SettingsSection from "sales-booster/src/components/settings/Panels/PanelSettings/SettingsSection";
import SingleCheckBox from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/SingleCheckBox";
import ActionsHandler from "sales-booster/src/components/settings/Panels/PanelSettings/ActionsHandler";
import SettingInstruction from "./SettingInstruction";

function GeneralSettingsTab(props) {
const {
Expand Down Expand Up @@ -56,7 +57,7 @@ function GeneralSettingsTab(props) {
"storegrowth-sales-booster"
)}
/>

<SettingInstruction />
<ActionsHandler
resetHandler={onFormReset}
loadingHandler={buttonLoading}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import Image from "antd/es/image";
import scInstruction from "../../images/stock-bar-instruction.png";
import FieldWrapper from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/FieldWrapper";

const SettingInstruction = () => {
return (
<FieldWrapper colSpan={24} justify={`start`}>
<div>
<p>
To be able to view the stock bar of a specific product must go to{" "}
<a href={`/wp-admin/edit.php?post_type=product`}>
<strong>all products</strong>
</a>{" "}
in woocommerce. Then select a desired product to <b>Edit</b>. In the
product meta of woocommerce you will be able to see{" "}
<b>"Inventory"</b>.
</p>
<Image preview={false} src={scInstruction} />
<div
style={{
marginTop: "10px",
}}
>
<p>
Explore full range of products{" "}
<a href={`/wp-admin/edit.php?post_type=product`}>
<strong>here</strong>
</a>
.
</p>
</div>
<div>
<button
style={{
backgroundColor: "#0875ff",
color: "#fff",
padding: "10px 20px",
border: "none",
borderRadius: "5px",
cursor: "pointer",
display: "block",
margin: "10px 0",
}}
onClick={() =>
window.open(
"https://storegrowth.io/docs/stock-bar/",
"_blank"
)
}
>
Documentaion
</button>
</div>
</div>
</FieldWrapper>
);
};

export default SettingInstruction;

0 comments on commit 762de1f

Please sign in to comment.