0
votes

I am in the process of building a e-commerce website for a small local grocery chain to allow their customers to order online and pickup at store. I will be integrating with the in-store POS system to pull the category & product data and push back the order data.

As I am new to Prestashop I am wondering if the following setup is possible out-of-the-box:

The POS system uses price zones which can be shared by stores (e.g. price_zone_1 is used by the 3 stores in San Francisco for pricing, price_zone_2 is used by 2 stores in Los Angeles for pricing).

The POS system have a pricezone_productprice table

product_id   pricezone_id    price
1            1                14
1            2                12

Then there is store_stock table

product_id   store_id         stock
1            1                98
1            2                45

And the store table has a pricezone foreign key that ties everything together

store_id         pricezone_id
1                2
2                1

I need to have a similar setup on the Prestashop side to exchange data and display correct pricing and stock information for different stores.

Is such a structure/feature available out-of-the-box? If not are you aware of any module that might help with this? And finally if nothing is available how feasible do you think this is to develop under prestashop?

I explored multistore feature but as far as I understand that would not do what I am looking for as it separates order history, etc. I want customers to be able to see their order history from different stores in one page.

1
I recently had a similar problem with differing prices for certain conditions but not being able to use multistore. My "solution" was to use customer_groups and then assign specific prices for said group, it's a bit hacky but looked liked the simplest thing. Might have been easier in my case since the price varies according to referral, but you could probably find a way to set the default customer group to eG "pricezone_1" either by location or user input then display prices accordingly. I can share the way i set the groups if you're interested. - defuzed
This sounds interesting. How would pricing based on customer groups work for non-registered visitors? In other words do they need to be registered first to be able see the correct price for the group they belong? In any case I'd be interested in learning how you setup the groups as I am pretty new to prestashop. - icramc

1 Answers

1
votes

This might deserve an entire Override for Product Class with a Module. But honestly, you should better do a multishop website based on the zone you want to deliver, then ask the client when he enters the website.

It will cost you 10 minutes and fine tuning instead of hours of dev and lot's of debug.

If you still want to use a Module, just overide Product class and following methods : getPriceStatic and getProductPrice

NB : Another idea would be to consider price by ... country and tell each as a separate one. But this can be dangerous :).