select city popup in magento - magento

I have a magento store. I want to operate in a city. When one customer visit the store he/she will asked to select his/her area from a dropdown list in a popup. Then the customer is allowed to see the products in the store and shop online.
Example: Suppose My city is Bhubaneswar
Areas: Acharya Vihar, Vani Vihar, Rasulgarh, Barmunda.

U can create different stores for different places and put this Mage::app()->setCurrentStore($store_id); to make your storeid your current one

For each store you can map several areas, this mapping could be represented in your city area table, by adding a store_id column.
The customer selects the desired store by selecting the city/area, you can then redirect to the desired url with the store scope here you should use
Mage::getUrl($path, array(
'_store'=>'your_store_id'
));
To restrict the store as you said, there are different approaches, one is having a default store that is not associated with any area, then you make the categories/products available/enabled only for the stores other than this default one.

Related

Libreoffice-base subform_sales_desc inside form_order . first form cannot enter items as number and show as names and not gst,unit etc automatically

I am creating free accounting package in libreoffice-base to compete already available ones your contribution is appreciated. the package include tables:
items
item_groups
order_details
sales_bill_desc
cash
units
companyinfo
bill sales
Customer_ledger
etc.
and created two forms
first to enter items in items table with following fields:
id
List item
particulars
units from units table linked with id gst chooses from
tax table related as id basic price basic stock, barcode, group,
subgroup,
second form is sales bill entry form
it contains a form which relates to order_details table selects customers name from ledger where its state code is also defined e.g. for punjab its 03 basically it is picked from customer's GSTIN number
a subform which is connected to sales_bill_desc table related to order_details table with bill number in both tables.
now in subform when we enter one item, its name is displayed which is same entered in sales_desc table additionally it also need automatically display item units, gst, price(editable field but basic price must be displayed there).but it does not. how to do that i have studied books but am lacking i created same in access 2016 somewhere which worked fine (full working package accounts with inventory).At this time,I am trying to use same database but advanced with features such as barcode. Of course the issue is to be resolved if someone can help. I am loading code of the package.Please rectify and update.

Magento FPC and $_SESSION object

How to use a cache when you have content depending on SESSION variable?
Does it work with Varnish-like cache? Does it require FPC?
let me explain.
My customers can select their model of Car (manufacturer, model, year), once selected this is stored in SESSION object.
(Of course every product is linked to a list of Cars in the back end.)
The thing is, on the frontend, There is a module that automatically filters the products according to the Car selected by the customer.
I'm not only talking about a user that would search for a product by entering a keyword on the search bar.
I'm also talking about the category pages.
When the customer visits the website, clicking on a category, then the list of products within this category is filtered too!
So while the customer navigates, he only see compatible products with his car.
I failed to use VARNISH because of this (VARNISH is based on url only, and the selected Car is not part of every url...).
That's why I'm wondering if there is any concept of Cache that would take into account SESSION variables?
thanks,
Rod

Magento - modify search for multiple stores

We've got 2 magento stores configured, A and B:
Store B only shows categories and products below the catgory CAT2.
Now, when searching on store B's front-end, products from categories of store A come up. How can I avoid that? I'd like to cleanly separate products assigned to store A from those assigned to store B as store B is a specialized product segment presented with another company.
Any idea how to do this?
we finally set up the second store as a different website, this way we can assign products to either one or the other in the website section of the product, and search results adapt accordingly.

How to validate shipping address per product by city and restrict user?

I am using Magento 1.9. I want to create product and make available in only specific cities. And also I want to restrict users on checkout when they select product to ship in the city where the product is not available.
I am a beginner at Magento and don't know how to achieve this.
What I have in mind so far is, it will be good to create an attribute named 'city', make it multiselect and add cities as it's options. So now I can create product and assign multiple cities to it. and can be seen at the 'Additional Information tab' on frontend product's page.
But now I want to restrict user if he select orders product available in "New York" and he submitted shipping address with any other city. This should restrict the further process and display message.
In short, I want to restrict user on checkout and display message. "The product is not available in the specified address/city/location etc"

How can I show multiple megento stores in front end?

I have 2 stores called 'Retail' and 'Wholesale'. While adding product I have to select the store (It can be both the store or none or any one), and i have to add price for different store . If am selecting both the stores, how can I add different price for sores ?
How can I select sore In the product ?
While adding store we selects Category, I can manage store here but how will I display different price for same product ?
Magento has three levels of scope (listed below in ascending order of precedence):
Global (aka Default Configuration)
Website
Store (aka Store View)
There are also two scope contexts: system configuration and entity.
Note that not all sysconfig options or entity data can be set at each level. Product pricing is one such datum. In System Configuration > Catalog, product price can be configured as either global scope or website scope, but not store scope. To achieve store scope-like behavior, configure pricing to have website scope, assign each store to its own website, and set the price at the website level.

Resources