{"id":2142,"date":"2012-02-20T15:01:40","date_gmt":"2012-02-20T15:01:40","guid":{"rendered":"http:\/\/www.simonbattersby.com\/blog\/?p=2142"},"modified":"2012-02-23T10:30:22","modified_gmt":"2012-02-23T10:30:22","slug":"creating-a-mobile-version-of-an-opencart-shop-3","status":"publish","type":"post","link":"https:\/\/www.simonbattersby.com\/blog\/2012\/02\/creating-a-mobile-version-of-an-opencart-shop-3\/","title":{"rendered":"Creating a mobile version of an Opencart shop \u2013 3"},"content":{"rendered":"<p>OK, so today I&#8217;ve reworked the header links to include a Home link but remove the Logout link &#8211; I&#8217;ve moved the latter to sit under My Account.<\/p>\r\n<p>I&#8217;ve also redone (again..) the category page, having given up trying to fit everything onto one line, quite pleased with the result.<\/p>\r\n<p>I also copied across all the products from the base store to the mobile store, using, for example, this SQL:<\/p>\r\n<pre>CREATE TEMPORARY TABLE tmp SELECT * FROM oc_product_to_store WHERE store_id = 0;\r\n\r\nUPDATE tmp SET store_id=2 WHERE store_id = 0;\r\n\r\nDELETE FROM oc_product_to_store WHERE store_id=2.\r\n\r\nINSERT INTO oc_product_to_store SELECT * FROM tmp WHERE store_id = 2;<\/pre>\r\n<p>This needs repeating for <code>oc_category_to_store<\/code> as well. My initial thoughts on categories was to create some different categories to avoid masses of scrolling, but I&#8217;m thinking in fact that this may be handled just as well by the inbuilt pagination.<\/p>\r\n<p>I&#8217;ve also added a &#8220;back to category&#8221; link to the product page and restyled that, removing all the tables.<\/p>\r\n<p>And finally, styled the home page links so they look a bit nicer. Not sure at the moment whether having those links full width will get in the way of scrolling the page up and down. Results below:<\/p>\r\n<img loading=\"lazy\" decoding=\"async\" class=\"blog_img\" src=\"\/images\/blog\/aw_mobile_4.jpg\" alt=\"Reworked home page\" title=\"Home page\" height=\"400\" width=\"259\"\/>\r\n<img loading=\"lazy\" decoding=\"async\" class=\"blog_img\" src=\"\/images\/blog\/aw_mobile_5.jpg\" alt=\"Reworked category page\" title=\"Category page\" height=\"400\" width=\"259\"\/>\r\n<img loading=\"lazy\" decoding=\"async\" class=\"blog_img\" src=\"\/images\/blog\/aw_mobile_7.jpg\" alt=\"Product page\" title=\"Product page\" height=\"400\" width=\"259\"\/>\r\n<img loading=\"lazy\" decoding=\"async\" class=\"blog_img\" src=\"\/images\/blog\/aw_mobile_6.jpg\" alt=\"Reworked My Account page\" title=\"My account page\" height=\"400\" width=\"259\"\/>\r\n<p>Looking at these screenshots I realise I now have space to make the button on the category page larger again, also wonder whether the links on the My Account page should be buttons like the home page.<\/p>\r\n\r\n\r\n","protected":false},"excerpt":{"rendered":"<p>OK, so today I&#8217;ve reworked the header links to include a Home link but remove the Logout link &#8211; I&#8217;ve moved the latter to sit under My Account. I&#8217;ve also redone (again..) the category page, having given up trying to fit everything onto one line, quite pleased with the result. I also copied across all [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[29,28],"class_list":["post-2142","post","type-post","status-publish","format-standard","hentry","category-web-design-and-build","tag-mobile","tag-opencart"],"_links":{"self":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/posts\/2142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/comments?post=2142"}],"version-history":[{"count":0,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/posts\/2142\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/media?parent=2142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/categories?post=2142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/tags?post=2142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}