How to add new custom fields in checkout using checkout-sdk-js of bigcommerce? - bigcommerce

How to add new custom fields in checkout using checkout-sdk-js of bigcommerce?
SDK:       https://github.com/bigcommerce/checkout-sdk-js
Example: https://github.com/bigcommerce/checkout-sdk-js
After fields add data of custom fields will be stored? How?
P.S. - I did a lot of search about it, but didn't get it that's why I've created this questions.

About storing the custom fields' data -- this depends on which framework you build your checkout with. If you decide to go with React, for example, you will store this 'new data' in the react state. To continue this example with React in mind, you can add new custom fields to the .jsx file depending on where you are needing these form fields to be located. However, the checkout SDK is written in vanilla JS, meaning it is completely framework-agnostic. So you can build your checkout in React, Angular, Vue, or even just plain HTML and JavaScript–whichever frontend framework you prefer to build in.

Related

Is there a way to create tabs and mark selected tab based on page loaded in spartacus

I am using spartacus framework for storefront. I want to show tabs in my application and load pages based on selected tab. Is there any existing cms component or configuratio with which we can do or can i extent the cmscategorynavigation component and customize?
The CMSTabParagraphContainer is used on the product details page to display tabs. A CMSTabParagraphContainer can contain SimpleCMSComponents but not for example ContentPages. You would have to extend the CMSTabParagraphContainer on the backend to also accept ContentPages, ProductPages etc. and then extend the frontend components as well. To extend Spartacus components have a look at: https://sap.github.io/spartacus-docs/customizing-cms-components/
To be honest: This seems like a lot of work if you just want a visual change to the navigation

Vue - Switch between two different templates

I've been developing a new Vue project to control the connected devices from one point, I've been working on an admin template and it's all good but there is something that I want to learn and implement to this application.
Let's say I want to change the whole frontend template (the admin template that I'm using now) and use a new design, how can I implement the whole existing application to a new template? For example, when you start creating a Wordpress page, it gives you different templates and you choose some of them and start designing the website... Maybe after six months you want to change that design and you simply click and switch to a new template and all the existing content will be migrated to the new template. That is exactly what I want to do with Vuejs.
I have to do this project, which I prepared with the existing theme, dynamically, as if I will pass it to another theme in the future. When switching my existing project to a new theme, instead of copying all the components and their related scripts, I want to be able to switch just like in Wordpress by simply throwing the theme file into the project. How can I add this functionality to the project?

Creating a custom BigCommerce theme from scratch, without selling it in the theme store

A client of mine wants to create their ecommerce site with BigCommerce as back-end. BigCommerce has lots of theme's available in their theme store. This client however does not want to be just another website using a certain theme, but have a theme unique to their company. You can build your own theme which would use your own config.php, something they use to set global variables in their templating engine.
However as far as I can read on their developers site the only way that you could create your own theme is if you then start selling it in the theme store, which of course would allow other companies to adopt this same theme against a certain price. Something my client doesnt want. They want to be unique.
So my question is: Can you create a custom bigcommerce theme from scratch, without selling it in the theme store?
Absolutely, however you can set up a config.php file and all that. You can simply start with any theme available in the current theme store, download the HTML, CSS, JS, Image, etc files and customize them to your liking. These are completely open ended.
You won't really miss anything this way, the only thing the config file does is set the default store settings when that theme is applied such as menu depth, fly out menus, display of weight, etc. All that can be adjusted manually by you or your client in the store settings!
So to answer my own question directly: No, you cannot create a theme from scratch without being a parter of bigcommerce and making your theme available in the theme store.
You can get close as #TheEks describes by simply choosing a theme (preferably the blueprint, available when going in to dev mode), and then overwriting whatever contents the html files have. You will need to check for updates to the bigcommerce theme yourself and implement those in your code. You will not be able to remove theme files, if you no longer use them, from the webdav server, only revert them to their original state. You can just ignore them of course.

Shopify api: add a link

I am developing a shopify app.
Is it possible to add a new link to the main menu via the shopify API?
Thanks
If you log in to your partner account and then create an App you can edit the created App and you will see all the resources at your disposal where you can add a new link.
If you notice also, using the API you can pull and rewrite any asset in a shop to contain a new link. This is discouraged as bad practice. Instead, inject a script tag that does the dirty work.
Soon as I know the API itself cannot change something inside the theme files... some APPs ask you to apply some code manually in the theme, with proper instructions... maybe this code could add the new menu or dynamically interact to get it.

Display a form in prestashop

I would like to show a form in prestashop module and would like to store that value in database. How is it possible?? Is there any prestashop expert ??
You may use custom HTML block and add your form code inside that. And off course have to use a hook to show up that HTML block in the site.
There are lots of free Custom HTML block modules available.
You should take a look at all the modules available in the modules/ directory.
If you want to display a form in the back and/or the front office, you'll have to override different methods of the Module class, and you'll have to use the different hooks available..
Best regards,
Try this free module :
https://www.prestashop.com/forums/topic/391966-megablock-16-module-gratuit/
With this one you can add HTML in some hooks from back-office.
Everything is stored in database.
You should use Helpers and Tools class (Helpers show forms and Tools::getValues() does what it says...)
In MegaBlock there is also TinyMCE available. Have a look, this module is really useful ;-)
you can develop a module by using hooks based on the hooks used the form will be displayed in that position in prestashop while using hooks you need to assign a tpl file in that tpl file you can write the codings to display a form
And also you can develop a module with a separate controller and you can assign a tpl for that controller.