Images doesn't get updated with computed method NuxtJS + working example - javascript

I've created a bookmark list, & I used local storage to save user choices as a bookmark
after one coin get's added to the bookmark list I sort them based on this event and added coins gets on top of the list
My issue is when I reload the page images & links doesn't get updated base of data change but anything else will
I've created a working example on the code sandbox website
https://codesandbox.io/s/sleepy-chandrasekhar-pt3pm?file=/pages/index.vue
Here is an example on our online website(This is for the advanced trade page):
https://app1.tabachain.com/trade?market=DOGE_USDT

Related

Firebase updating collection/storage regenerates the same file in the storage

I am using firebase storage to link my images into the collection with getDownloadUrl.I have 3 methods on the admin page add/delete/edit. Add and delete work properly but when I want to edit an existing item firebase regenerates the same image multiple times, as you can see in the image. I attached the codeSandbox link to the code here.
In the end, I am getting the right link to the image for my collection doc and properly updating the existing image.

Going to new page in sveltekit adds new html on top of old one

I have a really weird problem that I can't find anything related online, I have a web application built in sveltekit and on one page I have a button that redirects to another page using the goto function, but the new page get's added to the bottom of the old one, including the header and shared components it's like the entire page was imported twice in a root component, when I refresh the old one goes away
It's a pretty big website so it's hard to reproduce in a repl
here is the Link
Here are the steps to recreate it
click on order now
choose pickup (delivery has a radius restriction for address)
choose any category
add some items to cart
once it's in the cart go back to the previous page and select another
category
there will be a popup asking you if you are sure since this will
delete your previous items
that's when it happens
Any help will be greatly appreciated, If you think any part of the code will be helpful I will post it

Saving data using Jquery or Javascript

Is there any way to save variables using Jquery or javascript, besides setlocalstorage?
For example: I have a product catalog website online. I made administration rights features like a window where you can add the name, picture and price of an item. That item data goes into the array using push(). But it only works locally. I want the items I add to be seen by anyone who visits my website.
var products=[["fishing rod","https://i.pinimg.com/originals/d1/1c/41/d11c419d0c75307b18e388a0c2d64907.jpg",10.99],["fishing line","https://s7d2.scene7.com/is/image/dkscdn/15SFXUSFXSG330YD6FLI_Clear_is/",3.99]];
I have 3 inputs on my window, 1 for name, 1 for img src and the last one for the price. When I click 'OK' it pushes that new array into my products array. But I want to save that array inside the folder of my online website. So that more people with admin rights can add more products and that I can see the changes online.
I hope I made myself clear.
You should use a backend that store this data in some kind of database (SQL or nosql).
Then you access it a display the content to all the users.

Shopify - Use Custom Image in Cart - Variant Image Not an Option

In Shopify, I have a custom product where the product chosen consists of multiple layers of elements (3 to be exact). I've learned how to combine those canvases into one image and would like that image (js image object) to translate over to the cart page. Is this possible?
If it is, can it still be stored correctly if it's in the cart and the user visits the site again later?
Note: Can't use a variant image for this because it's a product when customized can end up with over 4k variations.
You can follow this to store custom information for a product in the cart - https://help.shopify.com/themes/customization/products/get-customization-information-for-products
Make sure the image that you are generating can actually called by a URL
To show in the custom information in cart and order page you can follow this - https://help.shopify.com/themes/liquid/objects/line_item

Magento - Simple Configurable Products Extension

I'm using the Magento SCP extension to change various details on the product page when selecting an option in the configurable product.
I need to extend the functionality so that I can change the description, image etc when clicking on a thumbnail image instead of changing the list options.
As far as I can tell, the function that deals with the changing of product description etc is:
Product.Config.prototype.reloadPrice
I'm not sure how I can run this when I click on a thumbnail, what information do I need to pass to the function to run properly?
Take a look at this site I am working on, this is using bundle products. But I am just looking to get an idea of what you are trying to do..
Click on the individual products to see them load below your selection
Let me know if this is what you are looking to do and I can help guide you
Site Example
The site I am demonstrating is using a custom route I load via Ajax.
I figured it out in the end.
When changing the dropdown values from clicking on an image elsewhere in the page I need to run the following code:
spConfig.configureElement(element)
Where (element) is the Dropdown's ID which I stored in a VAR further up the page.

Categories

Resources