Closed BigShoots closed 3 years ago
This is what I used to find if the item is out of stock and the price.
labels: {
maxPrice: {
container:
'.shop-item-description .shop-price > div',
euroFormat: false
},
outOfStock: {
container:
'.col-sm-4 .shop-stock-prod',
text: ['Backordered']
}
How did you manually add pccanada? I've created a .ts file for the store and added it to the .env; however, streetmerchant does not recognize it when I run: I must need to register the store elsewhere in the program, but where?
@abeth66 I just used a pre-existing store's .ts file and replaced the contents with my PC-Canada code. In my case I used the PNY store.
Unfortunately, I still can't get streetmerchant to recognize pccanada despite having cloned and modified pccanada.ts from memoryexpreess.ts:
My pccanada.ts:
import {Store} from './store';
export const PCCanada: Store = {
labels: {
inStock: {
container: 'div[class="instockcontainer-dbonly hide"]',
text: ['in stock']
}
},
links: [
{
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url: 'https://www.pc-canada.com/item/G1050TGX4.html'
},
{
brand: 'asus',
model: 'tuf',
series: '3080',
url: 'https://www.pc-canada.com/item/TUF-RTX3080-10G-GAMING.html'
},
{ brand: 'asus',
model: 'tuf oc',
series: '3080',
url: 'https://www.pc-canada.com/item/TUF-RTX3080-O10G-GAMING.html'}
],
name: 'pccanada',
waitUntil: 'domcontentloaded'
};
Any help would be appreciated.
On a side note, can anyone tell me where to get started on learning about this code? Any courses, resources, specific code I can start to learn? I have ZERO coding knowledge and want to start learning.
I replaced the contents of the pny.ts file with my pccanada code and then enabled pny in my env file.
Thank you for the workaround. I was able to get pccanada.ts to work by writing it into streetmerchant\src\store\index.ts
@abeth66 Great, I knew there had to be a way, but couldn't figure it out. I've used your method now as its more desirable.
I've manually added myself, but would be nice if you could incorporate PC-Canada so I don't have to manually add all the cards.
Thanks!