Skip to content

Instantly share code, notes, and snippets.

@locmai0808
Last active October 25, 2020 18:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save locmai0808/3ae38c64a5fdd00b1e780b0d0cbdd0ca to your computer and use it in GitHub Desktop.
Save locmai0808/3ae38c64a5fdd00b1e780b0d0cbdd0ca to your computer and use it in GitHub Desktop.
Add 3000 card to cart - US only
// Steps:
// 0. Open Chrome browser and go to https://www.nvidia.com/en-us/geforce/
// 1. Open developer tools by pressing F12 or Ctrl + Shift + I
// 2. Navigate to Console tab.
// 3. Copy and paste this whole thing.
// 4. Replace [3090] with [3080] in the localStorage.nvidiaCart = JSON.stringify(rtxCards[3090]); to add 3080 card.
// 5. Press Enter then refresh the page and you should see your desired card in the cart!
let rtxCards = {
3080: {
cart: [
{
id: 5438481700,
sku: '900-1G133-2530-000',
name: 'NVIDIA GEFORCE RTX 3080',
quantity: 1,
listPrice: 699,
totalPrice: '699.<span class="decimal">00</span>',
productIsInStock: 'true',
productIsAllowsBackorders: 'false',
expires: new Date(
new Date() * 1 + 4 * 24 * 60 * 60 * 1000
).toISOString(),
locale: 'en-us',
limitPerCustomer: 1,
availableQuantity: null,
promo: [
{
id: 5440852400,
name: 'GeForce NOW 1 Year Membership (RTX 30 Series Offer)',
image:
'https://drh1.img.digitalriver.com/DRHM/Storefront/Company/nvidia/images/product/thumbnail/geforce-rtx-bundle-geforce-now-thumbnail-100x100.png'
},
{
id: 5440851900,
name: 'Watch Dogs: Legion',
image:
'https://drh1.img.digitalriver.com/DRHM/Storefront/Company/nvidia/images/product/thumbnail/geforce-rtx-bundle-watch-dogs-legion-thumbnail-100x100.png'
}
]
}
],
lastAction: {type: 'ADD_ITEM_TO_CART', id: 5438481700, quantity: 1}
},
3090: {
cart: [
{
id: 5438481600,
sku: '900-1G136-2510-000',
name: 'NVIDIA GEFORCE RTX 3090',
quantity: 1,
listPrice: 1499,
totalPrice: '1,499.<span class="decimal">00</span>',
productIsInStock: 'true',
productIsAllowsBackorders: 'false',
expires: new Date(
new Date() * 1 + 4 * 24 * 60 * 60 * 1000
).toISOString(),
locale: 'en-us',
limitPerCustomer: 1,
availableQuantity: null,
promo: [
{
id: 5440852400,
name: 'GeForce NOW 1 Year Membership (RTX 30 Series Offer)',
image:
'https://drh1.img.digitalriver.com/DRHM/Storefront/Company/nvidia/images/product/thumbnail/geforce-rtx-bundle-geforce-now-thumbnail-100x100.png'
},
{
id: 5440851900,
name: 'Watch Dogs: Legion',
image:
'https://drh1.img.digitalriver.com/DRHM/Storefront/Company/nvidia/images/product/thumbnail/geforce-rtx-bundle-watch-dogs-legion-thumbnail-100x100.png'
}
]
}
],
lastAction: {type: 'ADD_ITEM_TO_CART', id: 5438481600, quantity: 1}
}
};
// To remove item from cart:
// localStorage.removeItem('nvidiaCart');
// To add 3090 to cart
localStorage.nvidiaCart = JSON.stringify(rtxCards[3090]);
// To add 3080 to cart, replace 3090 with 3080...
// localStorage.nvidiaCart = JSON.stringify(rtxCards[3090]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment