Streetmerchant: Trying to add links for UK stores help

Created on 20 Nov 2020  路  3Comments  路  Source: jef/streetmerchant

Hi

I am trying to add the AMD RX 6800 cards for all the U.K. stores but I鈥檓 having some issues? Here is part of my code for adding the series. What is wrong as able to alert for 3090 cards. The program also overwrites anything I edit in this scan.Json
Thanks
413A8128-A667-4655-9EAD-75E740C917AC

Most helpful comment

I just added it and it works fine:
scan.ts

{
series: '6800 xt',
        url:
            'https://www.scan.co.uk/shop/computer-hardware/gpu-amd/amd-radeon-rx-6800-xt-pcie-40-graphics-cards'
},
{
    series: '6800',
    url:
    'https://www.scan.co.uk/shop/computer-hardware/gpu-amd/amd-radeon-rx-6800-pcie-40-graphics-cards'
}

config.ts

const store = {
    autoAddToCart: envOrBoolean(process.env.AUTO_ADD_TO_CART, true),
    country: envOrString(process.env.COUNTRY, 'usa'),
    maxPrice: {
        series: {
            3070: envOrNumber(process.env.MAX_PRICE_SERIES_3070),
            'rtx 3070': envOrNumber(process.env.MAX_PRICE_SERIES_3070),
            3080: envOrNumber(process.env.MAX_PRICE_SERIES_3080),
            'rtx 3080': envOrNumber(process.env.MAX_PRICE_SERIES_3080),
            3090: envOrNumber(process.env.MAX_PRICE_SERIES_3090),
            'rtx 3090': envOrNumber(process.env.MAX_PRICE_SERIES_3090),
            '5700 xt': envOrNumber(process.env.MAX_PRICE_SERIES_5700XT),
            6800: envOrNumber(process.env.MAX_PRICE_SERIES_6800),

store.ts

export type Series =
    | 'test:series'
    | 'rtx 3070'
    | '3070'
    | 'rtx 3080'
    | '3080'
    | 'rtx 3090'
    | '3090'
    | '5700 xt'
    | '6800'
    | '6800 xt'
    | 'ryzen5950'
    | 'ryzen5900'
    | 'ryzen5800'
    | 'ryzen5600'
    | 'sonyps5c'
    | 'sonyps5de'
    | 'xboxsx'
    | 'xboxss';

.env

MAX_PRICE_SERIES_3070=530
MAX_PRICE_SERIES_3080=750
MAX_PRICE_SERIES_3090=
MAX_PRICE_SERIES_5700XT=360
MAX_PRICE_SERIES_6800=
MAX_PRICE_SERIES_6800XT=
MAX_PRICE_SERIES_RYZEN5600=
MAX_PRICE_SERIES_RYZEN5800=
MAX_PRICE_SERIES_RYZEN5900=
MAX_PRICE_SERIES_RYZEN5950=

image

All 3 comments

I just added it and it works fine:
scan.ts

{
series: '6800 xt',
        url:
            'https://www.scan.co.uk/shop/computer-hardware/gpu-amd/amd-radeon-rx-6800-xt-pcie-40-graphics-cards'
},
{
    series: '6800',
    url:
    'https://www.scan.co.uk/shop/computer-hardware/gpu-amd/amd-radeon-rx-6800-pcie-40-graphics-cards'
}

config.ts

const store = {
    autoAddToCart: envOrBoolean(process.env.AUTO_ADD_TO_CART, true),
    country: envOrString(process.env.COUNTRY, 'usa'),
    maxPrice: {
        series: {
            3070: envOrNumber(process.env.MAX_PRICE_SERIES_3070),
            'rtx 3070': envOrNumber(process.env.MAX_PRICE_SERIES_3070),
            3080: envOrNumber(process.env.MAX_PRICE_SERIES_3080),
            'rtx 3080': envOrNumber(process.env.MAX_PRICE_SERIES_3080),
            3090: envOrNumber(process.env.MAX_PRICE_SERIES_3090),
            'rtx 3090': envOrNumber(process.env.MAX_PRICE_SERIES_3090),
            '5700 xt': envOrNumber(process.env.MAX_PRICE_SERIES_5700XT),
            6800: envOrNumber(process.env.MAX_PRICE_SERIES_6800),

store.ts

export type Series =
    | 'test:series'
    | 'rtx 3070'
    | '3070'
    | 'rtx 3080'
    | '3080'
    | 'rtx 3090'
    | '3090'
    | '5700 xt'
    | '6800'
    | '6800 xt'
    | 'ryzen5950'
    | 'ryzen5900'
    | 'ryzen5800'
    | 'ryzen5600'
    | 'sonyps5c'
    | 'sonyps5de'
    | 'xboxsx'
    | 'xboxss';

.env

MAX_PRICE_SERIES_3070=530
MAX_PRICE_SERIES_3080=750
MAX_PRICE_SERIES_3090=
MAX_PRICE_SERIES_5700XT=360
MAX_PRICE_SERIES_6800=
MAX_PRICE_SERIES_6800XT=
MAX_PRICE_SERIES_RYZEN5600=
MAX_PRICE_SERIES_RYZEN5800=
MAX_PRICE_SERIES_RYZEN5900=
MAX_PRICE_SERIES_RYZEN5950=

image

hey could any share their .env file with me searching for 6800 and 6800xt in uk stores? i would be so appreciative im struggling a bit setting this up

Thanks @tomekfel.

@lukebendy, we don't have any links for UK in the repository yet. You'll have to find them and add them like @tomekfel has demonstrated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fabillopr picture fabillopr  路  3Comments

g1forfun picture g1forfun  路  5Comments

FawnPat picture FawnPat  路  4Comments

gahmee picture gahmee  路  3Comments

AlphaOmega2020 picture AlphaOmega2020  路  4Comments