Git Product home page Git Product logo

sc-starter-kit's People

Contributors

ajcsilva avatar bretterer avatar dakira avatar dependabot-preview[bot] avatar dependabot[bot] avatar duncanmcclean avatar himanshu007-creator avatar imgbotapp avatar martyf avatar techenby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sc-starter-kit's Issues

Add a screenshot to readme

I'd like to add a screenshot of what the starter kit looks like after some content has been populated so I can display it on the README.md.

All that needs done is to clone this repository down, get it setup, add some dummy products and take a screenshot of the homepage of the store.

Add Stripe checkout partial

<div class="border rounded p-2 mb-2 text-gray-600 focus:text-gray-800 outline-none" id="card-element"></div>
<input id="stripePaymentMethod" type="hidden" name="payment_method">

<script src="https://js.stripe.com/v3/"></script>
<script>
    var stripe = Stripe('{{ gateway-config:key }}');
    var elements = stripe.elements();

    const card = elements.create('card');
    card.mount('#card-element');

    card.addEventListener('change', ({error}) => {
        const displayError = document.getElementById('card-errors');

        if (error) {
            alert('There was an issue when loading: '+error.message);
        }
    });

    function confirmPayment() {
        stripe.confirmCardPayment('{{ client_secret }}', {
            payment_method: {
                card: card,
            },
        }).then(function (result) {
            if (result.error) {
                alert(result.error.message);
            } else if (result.paymentIntent.status === 'succeeded') {
                var paymentMethod = document.getElementById('stripePaymentMethod');
                paymentMethod.value = result.paymentIntent.payment_method;
                document.querySelector('form').submit();
            }
        });
    }
</script>

Gateway on Checkout form failing

But on last step of checkout ( payment ) get error: DoubleThreeDigital\SimpleCommerce\Exceptions\GatewayDoesNotExist
The provided gateway (index) does not exist.
C:\SERVER\OpenServer\domains\statshop\resources\views/checkout/payment.antlers.html

Gateways config

'gateways' => [
        \DoubleThreeDigital\SimpleCommerce\Gateways\DummyGateway::class => [],

        // \DoubleThreeDigital\SimpleCommerce\Gateways\StripeGateway::class => [
        //     'key' => env('STRIPE_KEY'),
        //     'secret' => env('STRIPE_SECRET'),
        // ],
    ],

Clean Install with Stripe fails /checkout/complete

Description

When you are going through the checkout process with Stripe and put in your cc details, after submitting that form, it redirects back to /checkout/complete but does not include the APP_URL.

The best I can tell from debugging is that the sites.php config file does not use config('app.url') for the default url.

The odd thing is when I change the the default url in sites.php, my /cart no longer works (404)

Here is the shots of things redirecting back to /checkout/complete
SimpleCommerce1

While trying to fix that to get {site:url} I found that the redirect="{site:url}/checkout/complete" in payment.antlers.html would return /. Changing the default url in sites.php to be config('app.url') it will cause a 404 on the /cart page

SimpleCommerce2

Steps to reproduce

1: run statamic new simple-commerce
2: add simple-commerce addon
3: run php please sc:install
4: add stripe payment processing (using test keys)
5: run through a checkout process

Part 2:
1: Run 1-5 above
2: change sites.php config file to have a url config('app.url')
3: visit cart page in a fresh browser

Environment

Environment
Application Name: Statamic
Laravel Version: 10.20.0
PHP Version: 8.3.0beta2
Composer Version: 2.5.5
Environment: local
Debug Mode: ENABLED
URL: simple-commerce.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: log
Queue: sync
Session: file

Simple Commerce
Currencies: USD
Gateways: Stripe
Repository: Customer: DoubleThreeDigital\SimpleCommerce\Customers\EntryCustomerRepository
Repository: Order: DoubleThreeDigital\SimpleCommerce\Orders\EntryOrderRepository
Repository: Product: DoubleThreeDigital\SimpleCommerce\Products\EntryProductRepository
Shipping Methods: Free Shipping
Tax Engine: DoubleThreeDigital\SimpleCommerce\Tax\BasicTaxEngine

Statamic
Addons: 1
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.19.0 PRO

Statamic Addons
doublethreedigital/simple-commerce: 5.3.5

Add Region to address fields

What would you like to see added?

shipping_region and billing_region were added in Simple Commerce - duncanmcclean/simple-commerce#483

They should be added with the rest of the fields, just whenever I have some time.

Is there a workaround you can use in the meantime?

N/A

Priority wise - where's this feature for you?

Will need it in the next few weeks

Remove Order Statuses & Product Categories

Description

Just as the title says - they have been removed from Simple Commerce as it doesn't make use of them out of the box. If needed, developers can add it to the sites.

Product variants blueprint should not have normal price field

Right now, the normal price field for standard products is on the blueprint for variant products. I've built a workaround in Simple Commerce in db1f142 and e417c3f but really this should be sorted so we don't need those hacky workarounds one day.

Ensure Account page on Checkout is wired up properly

We should ensure that the account checkout page is all wired up properly if a user goes down the route of registering or logging in.

Maybe we should also take the customer's email address when they go through with guest checkout?

PHP error in checkout

Description

I receive an error in the checkout process when I did not enter payment informations.

Steps to reproduce

When I go to checkout -> payment, I can confirm the "Finish & Pay" button without having entered anything. If I do so, I don't receive a hint on missing data but PHP outputs an error:

str_replace(): Argument duncanmcclean/simple-commerce#2 ($replace) must be of type string when argument duncanmcclean/simple-commerce#1 ($search) is a string

The error occurs here:
image
image

Environment

I've installed the demo shop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.