Jump to content

Belinda999

Members
  • Posts

    8
  • Joined

  • Last visited

Belinda999's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. A have same product in two, three categories, thus same product but different URLs, for each category. So, i thinking, that corresponding meta-description is better. My lack of knowledge, I did not realize that PrestaShop redirects to default category. Please delete this topic.
  2. HI, im using PS 1.4.8.6 and thinking about this challenge for prevent meta tags duplication and better search description. Can i extract category name from URL ? (canoncial is enabled) or exist another solution? Example URL: stavitelstvi-a-architektura is category name http://www.thewebpage.cz/stavitelstvi-a-architektura/182-architektura-1950.html
  3. Hi, If you need display all categories associate with product in product detail, i can help you. Im inspired here http://www.prestashop.com/forums/topic/122213-solved-display-categories-to-which-product-belongs-in-product-listing-page/ reply number #8 and attach the result below classes/Product.php 1. step (for me it's row 234) public function __construct($id_product = NULL, $full = false, $id_lang = NULL) // MOI naplneni $product pro product.tpl { global $cart; parent::__construct($id_product, $id_lang); if ($full AND $this->id) { $this->tax_name = 'deprecated'; // The applicable tax may be BOTH the product one AND the state one (moreover this variable is some deadcode) $this->manufacturer_name = Manufacturer::getNameById((int)$this->id_manufacturer); //volani funkce pro ziskani jmena $this->supplier_name = Supplier::getNameById((int)$this->id_supplier); $this->moi_2 = Supplier::getNameById((int)$this->id_supplier); // MOI testovaci promena $this->moi_categories_names = Product::Moicat($id_product); // HERE IS VARIABLE FOR TPL self::$_tax_rules_group[$this->id] = $this->id_tax_rules_group; if (is_object($cart) AND $cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')} != NULL) $this->tax_rate = Tax::getProductTaxRate($this->id, $cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); else $this->tax_rate = Tax::getProductTaxRate($this->id, NULL); $this->new = $this->isNew(); $this->price = Product::getPriceStatic((int)($this->id), false, NULL, 6, NULL, false, true, 1, false, NULL, NULL, NULL, $this->specificPrice); $this->unit_price = ($this->unit_price_ratio != 0 ? $this->price / $this->unit_price_ratio : 0); if ($this->id) $this->tags = Tag::getProductTags((int)$this->id); } if ($this->id_category_default) $this->category = Category::getLinkRewrite((int)$this->id_category_default, (int)$id_lang); } classes/Product.php 2. adding function (for me it's end of file, before last } ) public function Moicat($id_product) { // MOI funkce pro zobrazení jména kategorii $categories_ids = Product::getProductCategories($id_product); /*nejdriv se zjistují ID (jedno nebo vice) category pres funkci getProductCategorie pro produkt indetifikovany pres id_product */ $categories_names = array(); //vytvori se pole nazvy kateg. foreach ($categories_ids AS $id) // kazde policko z $categories_ids se ulozi do $ID {$category = new Category($id); // docasna promena se $category(objekt) se naplni třídou proměných Category(ID) $categories_names[] = $category->getName();// pro policko pole $categories_names se ziska jmeno (funkci tridy getName()) kategorie pres jeji ID z $category }// A znova ;konec foreach return $categories_names; //definice promene pro smartyho } Display in product.tpl <!-- Display categories --> {foreach from=$product->moi_categories_names item=moi_category_name} {$moi_category_name|escape:'htmlall':'UTF-8'} {/foreach} Please,comments, try it and reply.
  4. I deal with the display of all the categories assigned to the product in the product detail (product.tpl). Here is code http://www.prestasho...t-listing-page/ display categories in the list of goods (product-list.tpl), $ smarty variable products. Unfortunately, this method is not used now because the product listing (product.tpl) are read only information for this product ($ smarty product), then the problem is how to assign additional $ product item. Does anyone know where to do it? Product,tpl Product.txt
  5. Hi ,i tried code from this reply and its work. (after 3 hours, my litlle bug:D ) In PS 1.4.5.1
  6. I am only what has a bug with importing products into the PS 1.4.5.1?
  7. Thanks for reply, I tried the file in a clean installation with examples and i got same error. The last 4 columns I deployed as described. :-( iPod Nano (ID 1) Cannot save Incorrect datetime value:''for column 'date_upd' at row 1 iPod shuffle (ID 2) Cannot to save Incorrect datetime value:''for column 'date_upd' at row 1
  8. Hi I installed new version PS 1.4.5.1 Czech , its ok ,but i have problem with products import. Here is error code and file (UTF-8) . Where is error? I tried import in English , fresh installation, typed 1,2 to ID ,but no changes. Sorry for my bad English. 3 Errors Jednoduchy (ID 1) Cannot save Incorrect datetime value: '' for column 'date_upd' at row 1 Next product(ID 2) Cannot saveIncorrect datetime value: '' for column 'date_upd' at row 1Simple.txt
×
×
  • Create New...