Jump to content

MBroadbridge

Members
  • Posts

    13
  • Joined

  • Last visited

About MBroadbridge

  • Birthday May 25

Profile Information

  • Location
    Bracknell
  • Activity
    Freelancer

MBroadbridge's Achievements

Newbie

Newbie (1/14)

0

Reputation

1

Community Answers

  1. Hi, I have installed a custom fields module on v1.7.3 to assign a 'postcode' to each 'product' (the products are houses for sale). I need to display a ' x miles from you' on each product in the product list. So far I have nearly got it, I have just got to get the custom field module variable '{$product.dwf_postcode}' into the CategoryController.php file. My CategoryController.php currently looks like this: $postcode1 = $_POST['searcher_postcode']; // generated by a simple POST form on the category page, this is working correctly $postcode2 = {$product.dwf_postcode} // property postcode here pulled from the custom module, this is not working due to the brackets $url = "https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=$postcode1&destinations=$postcode2&key=[MY API KEY HERE, REMOVE FOR DISPLAY PURPOSES]"; //fetch json response from googleapis.com: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = json_decode(curl_exec($ch), true); //If google responds with a status of OK //Extract the distance text: if($response['status'] == "OK"){ $dist = $response['rows'][0]['elements'][0]['distance']['text']; echo "<p><i class='fa fa-map-marker'></i> $dist</p>"; } } Any help appreciated!
  2. Do you have friendly URL turned on? If so, turn it off, wait a minute and turn it back on again
  3. What version of Prestashop are you using?
  4. Do I not need to add something to the classes or controllers first?
  5. Hi all, I'm looking for a way that I can display a logged in customers' name on the product.tpl document. v1.7.3.0 please! All help much appreciated
  6. As the title suggests really, changed server and domain now it takes about 10/15 minutes for my modules pages to load in the backend. Any suggestions? Thanks
  7. My Amazon integration needs the languages to be enabled in order to still feed through orders ect. Is there anyway of redirecting the other language sites to my default /en ?
  8. I need to have multiple languages set up in order for my Amazon integration to work properly. However, my default is /en/ and Google has started showing search results linking to the /us/ version of the site which looks awful as nothing is populated in american. How can I disable the different language stores on the from end without removing them from Localisation > Languages? Website - www.funcases.co.uk Please note, I do not have language module enabled, this is not what I mean.
  9. Has anybody had any experience in changing the theme from default to a purchased one on an established store? I'm looking to upgrade my site's design but don't want it to go wrong as I have over 20,000 hits per month. any advise would be greatly received!
  10. Is it possible to make the categories on the left side of my page (www.funcases.co.uk) to be open, to show all of the subcategories inside each category? I'm using the default theme on Prestashop 1.6.0.9 Thanks in advance
  11. Hi all, Please see below my code, I'm looking for a way to change the $MENU so that I can add a class to each link in my navigation bar. The file this is from is BlockTopMenu.tpl. I'm using a theme called 'Wine Store' {if $MENU != ''} <div class="clear"></div> <div class="main-mobile-menu"> <div class="wrap-title"> <h4>Categories </h4> <span class="open-mobile"></span> </div> <ul class="menu-mobile"> {$MENU} </ul> </div> <!-- Menu --> <div class="sf-contener clearfix"> <ul class="sf-menu clearfix"> {$MENU} {if $MENU_SEARCH} <li class="sf-search noBack" style="float:right" id="{$link->getPageLink('search')}"> <form id="searchbox" action="{$link->getPageLink('search')}" method="get"> <input type="hidden" name="controller" value="search" /> <input type="hidden" value="position" name="orderby"/> <input type="hidden" value="desc" name="orderway"/> <input type="text" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|escape:'htmlall':'UTF-8'}{/if}" /> </form> </li> {/if} </ul> <div class="sf-right"> </div> </div> <!--/ Menu --> {/if} Thanks in advance
×
×
  • Create New...