MFLM Posted January 13, 2017 Share Posted January 13, 2017 (edited) Hola a todos Necesito de su ayuda ¿Cómo puedo obtener la información de las tiendas, esto en el apartado Store Contacts? Por ejemplo, para obtener las categorías hago esto --> $categories = Category::getCategories($context->language->id); Esto en código PHP, lo que necesito realmente es obtener los horarios de la tienda para visualizarlos en una aplicación móvil, pero ya teniendo la información de las tiendas de contacto, haría un foreach para almacenar. Gracias Edited January 13, 2017 by MFLM (see edit history) Link to comment Share on other sites More sharing options...
ventura Posted January 13, 2017 Share Posted January 13, 2017 Prueba con algo asi: public function getStores() { $stores = Db::getInstance()->executeS(' SELECT s.*, cl.name country, st.iso_code state FROM '._DB_PREFIX_.'store s '.Shop::addSqlAssociation('store', 's').' LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id); return $stores; } Link to comment Share on other sites More sharing options...
MFLM Posted January 13, 2017 Author Share Posted January 13, 2017 (edited) Prueba con algo asi: public function getStores() { $stores = Db::getInstance()->executeS(' SELECT s.*, cl.name country, st.iso_code state FROM '._DB_PREFIX_.'store s '.Shop::addSqlAssociation('store', 's').' LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id); return $stores; } Hola Si ya entendí como hacerlo gracias Edited January 13, 2017 by MFLM (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now