shopify

Shopify: How to delete database entry fast after uninstall web-hook response, so the merchant uninstall and re-install quickly?

孤者浪人 提交于 2019-12-24 19:23:13
问题 This is my code in callbackController.php file $url = 'https://' . $_GET['shop'] . '/admin/webhooks.json'; $webhookData = [ 'webhook' => [ 'topic' => 'app/uninstalled', 'address' => config('app.url').'uninstall.php?shop='.$shop, 'format' => 'json' ] ]; $uninstall = $sh->appUninstallHook($accessToken, $url, $webhookData); This is my uninstall.php file code , these file is in laravel root folder. $connection = new mysqli("localhost", "username", "******", "database"); $delete_shop = "DELETE

Shopify liquid : cart-template variant is not defined

自作多情 提交于 2019-12-24 08:58:31
问题 I am simply allowing to checkout out of stock product to buy. When a customer wants to buy product has inventory less than zero and clicks on view cart from ajax cart, I simply want to show message " dispatch by 7 June." in cart-template.liquid .I have applied logic as given below. If required full code ready to share. {% if variant.inventory_quantity < 1%} <p id="dispatch" style="color: #f48c21">Will be dispatched by June 7</p> {{variant.inventory_quantity}} {% endif %} <script>console.log

Shopify Custom Payment Gateway Implementation

此生再无相见时 提交于 2019-12-24 06:03:45
问题 I successfully added my payment gateway to admin and its also show me on checkout page but when user click on "place order" i don't have any idea about how shopify process after that. i want to make payment using custom payment gateway. Where i can add my custom file for payment gateway ? Or where i can add code for custom payment gateway. what i need to do is.. - when user click on "place order" button ,get all the detail of order - setup curl request for payment based on details 回答1: You

How to Combine external JavaScript with Shopify website

流过昼夜 提交于 2019-12-24 01:53:28
问题 I've tested my website with Pingdom and suggested to combine external javascripts, but I don't know how to do this with shopify website. 回答1: Adding external script files for Shopify theme is pretty simple. You just need to upload your script file to the asset folder of your theme file. Or you can create a .js file to paste your code there. After that you just need to include that script file to the theme.liquid file. Just need to add the following before end of tag in the theme.liquid file.

How do I tweak this in Shopify to hide variants that aren't available?

限于喜欢 提交于 2019-12-24 01:38:14
问题 Let's say we have shirt products. Variant is style/size. Men: L Men: XXL Men: XL Women: Small Women: XL Women: L Right now in default Shopify no matter what you select on style you'll still be able to choose any of those sizes even if it's not available for that style. How do you force this check to happen based on your style selection? I believe the theme is using a modified version of this technique: http://wiki.shopify.com/Tutorial_on_editing_existing_theme_to_use_products_with_multiple

Whitespace control in Shopify Liquid

[亡魂溺海] 提交于 2019-12-23 17:09:11
问题 Shopify recently added whitespace control to the Liquid templating language: https://help.shopify.com/themes/liquid/basics/whitespace You essentially add an hyphen in your tag syntax {{- -}} , {%- -%} to strip whitespace (html empty line) outputted by a tag. For example: {%- assign variable = "hello" -%} {{ variable }} Renders: hello Instead of: hello Is there a way to turns this on for all assign tags? and/or all specific control flow or iteration tags? 回答1: Indeed. You turn it on when you

centering body and big slider

我是研究僧i 提交于 2019-12-23 17:00:05
问题 I've managed to uncenter my body while trying to position my slider in the background so that it is also centered and so that it remains centered even when the window is resized. The site is live if your browser allows to zoom out you can see that the site is centered but when you open it and the slider image is too big it just aligns with the left edge of the window. I am self-taught so maybe I have missed something or just need some guidance how to fix this. please HELP! the css is here:

Web API 2 return OK response but continue processing in the background

女生的网名这么多〃 提交于 2019-12-23 11:53:38
问题 I have create an mvc web api 2 webhook for shopify: public class ShopifyController : ApiController { // PUT: api/Afilliate/SaveOrder [ResponseType(typeof(string))] public IHttpActionResult WebHook(ShopifyOrder order) { // need to return 202 response otherwise webhook is deleted return Ok(ProcessOrder(order)); } } Where ProcessOrder loops through the order and saves the details to our internal database. However if the process takes too long then the webhook calls the api again as it thinks it

How to capture if current vendor is selected

一笑奈何 提交于 2019-12-23 04:50:13
问题 In my sidebar on the collection pages and index, I have listed all vendors with the code below. Now I want to add an .active class to the <li> when that particular vendor is selected. I want to do the same thing with a list of product types. How do I check which vendor is selected? I tried {% if collection.handle == vendor %} . But it returns null as it can only capture collections names. <ul class="nav"> {% for vendor in shop.vendors %} <li class="collection-container {% if collection.handle

Postmates integration with Shopify Shipping/Carrier services

烈酒焚心 提交于 2019-12-23 02:34:49
问题 so we are looking to integrate this application: https://postmates.com/developer/docs into our Shopify platform. For how it works please check: http://blog.postmates.com/post/104856343907/a-technical-perspective-on-the-postmates-api . So we are looking for add a Carrier Service to our store. And As Postmates provides services to few regions as follows we will add other mutiple shipping options for non-Postmates supported regions. Postmates is currently available in the San Francisco Bay Area