Jump to content

irl

Members
  • Posts

    25
  • Joined

  • Last visited

irl's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. If work with third parties websites (auction?), may desire to list all images assigned to a product under description. Below is what would need to add/change in your php according to your needs. In my case they resize and had to include again 1st image in the description between. Declare new tags e.g. for private $condition = "New"; foreach ($Products AS $Product) { if ($Product['active'] and $Product['price']!=0) { $image = Image::getImages(intval($this->_cookie->id_lang), $Product['id_product']); $expire_date = date('Y-m-d', strtotime("28 days")); $Price = Product::getPriceStatic(floatval($Product['id_product'])); $Category = Product::categoryName($Product['id_category_default']); $count=count($image); $mystr = ""; for($i=0;$i<$count;$i++){ $mystr .= "".'http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__. "img/p/" . $image[$i]['id_product'] . "-" . $image[$i]['id_image'] ."-large.jpg" . " ";} $item = "\n" . ""."Code".strtolower(Language::getIsoById($this->_cookie->id_lang))."-".$Product['id_product']."\n" . "<Title><![CDATA[".xml_convert($Product['name'])."]]></Title>\n" . "<![CDATA[".xml_convert($Category)."]]>\n" . "".round($Price)."\n" . "1\n" . "New\n" . "Miami\n" . "Ask" . "<![CDATA[".'http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'img/p/'.$image[0]['id_product'].'-'.$image[0]['id_image'].'-large.jpg'."]]>\n" ."<![CDATA[" .strip_tags($Product['description_short'])." - " .strip_tags($Product['description'])." ".$mystr."]]>\n" . "\n\n"; $this->_addToFeed($item); } }
  2. Php for me is like salt in my eyes Spent >3 hours and still cannot get it work Works in asp flawless however in php "if" returns false always Changed to strcmp returns true always $itemarr = array( 'blam a', 'blam b'); foreach ($Products AS $Product) { if ($Product['active'] and $Product['price']!=0) { $Price = Product::getPriceStatic(floatval($Product['id_product'])); $Category = Product::categoryName($Product['id_category_default']); foreach ($itemarr AS $myarr){ If((string)$myarr == (string)$Category) $Price *= 1.25; } Any idea why?
  3. Nobody ?!? Should be somebody with PHP knowledge on this forum May be useful for others if have affiliates which would pull products and prices from your site.
  4. Hello, Would anybody know, how to increase prices (bulk %) in a selected Category all its subcategories and products I made a function in classes/products.php public function categoryName($id_category) { $sql ='SELECT `name` FROM `'._DB_PREFIX_.'category_lang` WHERE `id_category` = '.intval($id_category); $result = Db::getInstance()->getRow($sql); return $result['name']; } I am trying to get: if ($Category = Product::categoryName($Product['id_category_default']) {... selected categories A, B, C ... $Price = Product::getPriceStatic(intval($Product['id_product']))*1.25; } elseif ($Category = Product::categoryName($Product['id_category_default'])){ $Price = Product::getPriceStatic(intval($Product['id_product'])); } Above would increase all prices in all categories. Can anybody help? Thank you
  5. Hello, When generating XML files google base and other applications, how would remove formatting tags <style> etc in XML/description for example. Also when generating the files would be possible to ignore the products without price (price 0) Thanks Solved: . "<![CDATA[" .strip_tags($Product['description_short'])." - " .strip_tags($Product['description'])."]]>\n"
  6. Hello, I am looking for a presta tailored hosting, let's see how powerfull presta can be. Reading the forum, I understand that many presta users have serious problems with their hosting companies Can presta swallow 10000 items? PLEASE SHARE if know Requirements: - CHEAP !!! - dedicated presta - access to apache - full access to php min 2 versions - cpanel - unlimited sites - unlimited traffic - ssl, etc - 10Gb or more - min 10 mysql - 20-30 emails - EU or US only - dedicated IP - uptime 99.5% - response 30ms max continetal and max 100ms intercontinental - free of hidden resource management soft Thank you
  7. Thank you Rocky, Yes seems was a wrong version and I also found a module which was not installed properly. I did however upgrade @ prestashop 3132. Thank you for help
  8. Hello everybody, Contact-form displays a blank page without footer and the right column. Fatal error: Call to undefined method contact::getContacts() in …..\contact-form.php on line 10 Would anybody know what I did wrong and how I can resolve the issue? Thank you.
  9. inafara de povesti, povestitorule nu ai raspuns la o intrebare nespeculativa de ce 1.1 merge iar 1.2.4 nu merge pe acelasi wind server cu acelasi setup Bang! Cit despre safe se va posta in engleza cit de curind. Warning?! Please cut the crap sidro
  10. Ipower, debian, mysql 5.0.45, php 5.2.5, rewrite on/off, (acelasi rezultat), php as cgi, ce altceva Cel mai bine ar fi ca presta sa publice o configuratie tipica pt apache si exemplu php.ini, ar elimina tot felul de speculatii. Singura diferenta este php 5.2.9 in local (merge). De ce 124 are nevoie de suphp (daca am inteles bine de la sidro) in timp ce 1.1 nu. De ce 124 in local merge cu cgi, nu suphp. Dupa instalarile test facute este clar ca problema este cu serverul. Trebuie aflata cauza si o posibila remediere, nu abandonezi un server pentru o eroare de configuratie. Eroare de configuratie? si atunci de ce 1.1 merge 100% pe acelasi server? Mai am Win dar este set pentru asp Napoleon? Esti glumet, try Arthur Wellesley
  11. Hopa a aparut forum in romana deci frantuzii se trezesc. Eu sint de vina pt in ultimul an am postat 13 din care vreo 11 in romaneste in ultimele 7 zile. Multumesc sper sa-ti raspunda. Update. Situatia devine si mai interesanta. Chiar acum, am luat jos un site, am instalat 1.2.4 nou fara nici o modificare, creat client cont nou, logout, si da aceiasi eroare, cu presta 124 out of box. Apoi am sters totul, am instalat out of box 1.1 fara nici o modificare si merge 100%. Deci data de baze veche nu este de vina. Posibil ca cea de pe 124 sa aiba un glitch?
  12. la inceput asa am crezut si noi dar mai avem un site in acelasi public folder, tot presta, versiunea 1.1 care merge fara probleme. Deci sleep nu este blocata. Autenticarea cu probleme este presta 1.2.4. Ca moderator daca ai acces la presta ar fi interesant raspunsul lor. Parerea mea este ca nu raspund pentru ca nu stiu. Eu personal suspectez data de baze.
  13. Ce nu intelegi sidro, vrei sa-ti traduc? Clientii pot deschide conturi, dar daca logout nu mai pot login a 2a oara. Eroare: “The connection was reset. The connection to the server was reset while the page was loading. The site could be temporarily unavailable or too busy. Try again in a few moments.” Sa o traduc si pe asta? Cum previne sleep() atacul forta bruta in authentication.php, de ce este 1 si de ce da eroare Warning: sleep() has been disabled for security reasons authentication.php line 137. Cit despre spargere, siteurile in PHP sint mai putin protejate prin cod dar total prin .htaccess. Daca ai .htaccess-ul set 100% nimeni nu poate sa-ti sparga siteul si atunci care este scopul sleep(1) in authentication? Cu posturile astea poate, poate vor deschide astia si un forum in romana. Stati linistiti nimeni nu vrea sa fie moderator la presta ;-)
  14. Nu stiu daca am inteles bine, vrei sa scapi de cartul din userinfo, Daca este asa dute in modules/blockuserinfo/blockuserinfo.tpl comenteaza cu <!-- linia (+/-) 12 va arata asa <!-- apoi inchide comentul la linia (+/-) 17 va arata asa {l s='(empty)' mod='blockuserinfo'} --> Daca vrei sa nu apara numai pretul, comentezi <!--//--> linia cu functia $priceDisplay
  15. sidro te duci la nopcommerce si download ultima versiune cu cod pe scheletonul ala te costa 2-300 sa o adapteze la ceea ce vrei
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More