• 27-04-2019, 15:26:24
    #1
    OC v2.1.0.1
    website: otgtoptan.com
    Merhabalar, vqmod ile bir xml dosyasını websiteme ekledim. Amacım stokta olmayan ürünler için sepete ekle butonunu kaybetmekti. ancak bir hata ile karşılaştım ve sepete ekleme butonu bütün ürünlerde kayboldu.


    vqmod ile eklediğim xml kodları şu şekilde:

    <modification>
    <id><![CDATA[@tik Remove Add to Cart button for Out of Stock items]]></id>
    <version><![CDATA[1.4.1]]></version>
    <vqmver><![CDATA[2.4.1]]></vqmver>
    <author><![CDATA[OC2PS]]></author>
    
    <file name="catalog/view/theme/*/template/product/product.tpl">
    <operation>
    <search position="replace"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />]]></search>
    <add><![CDATA[<?php if ($stock_qty <= 0) {
    echo "<span style="color: red; font-size: 16px;"><span class="outofstock">" . $stock_status . "</span></span>";
    } else {
    echo "<input type="button" value="" . $button_cart . "" id="button-cart" class="button" />";
    } ?>]]></add>
    </operation>
    <operation>
    <search position="replace"><![CDATA[<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a>]]></search>
    <add><![CDATA[<?php if ($stock_qty <= 0) {
    echo "<span style="color: red; font-size: 16px;"><span class="outofstock">" . $stock_status . "</span></span>";
    } else {
    echo "<a onclick="addToCart('" . $product['product_id'] . "');" class="button">" . $button_cart . "</a>";
    } ?>]]></add>
    </operation>
    </file>
    
    <file name="catalog/controller/product/product.php">
    <operation>
    <search position="after" offset="6"><![CDATA[if ($product_info['quantity'] <= 0) {]]></search>
    <add><![CDATA[$this->data['stock_status'] = $product_info['stock_status'];
    $this->data['stock_qty'] = $product_info['quantity'];]]></add>
    </operation>
    </file>
    
    <file path="catalog/controller/product/" name="category.php,manufacturer.php,search.php,special.php">
    <operation>
    <search position="replace" error="skip"><![CDATA[$this->data['products'][] = array(]]></search>
    <add><![CDATA[$stock_status = $result['stock_status'];
    $stock_qty = $result['quantity'];
    
    $this->data['products'][] = array(
    'stock_status' => $stock_status,
    'stock_qty' => $stock_qty,
    ]]></add>
    </operation>
    </file>
    
    <file path="catalog/controller/module/" name="bestseller.php,featured.php,latest.php,special.php,wishlist.php">
    <operation>
    <search position="replace" error="skip"><![CDATA[$this->data['products'][] = array(]]></search>
    <add><![CDATA[$stock_status = $product_info['stock_status'];
    $stock_qty = $product_info['quantity'];
    
    $this->data['products'][] = array(
    'stock_status' => $stock_status,
    'stock_qty' => $stock_qty,]]></add>
    </operation>
    </file>
    
    <file path="catalog/controller/account/" name="wishlist.php">
    <operation>
    <search position="replace" error="skip"><![CDATA[$this->data['products'][] = array(]]></search>
    <add><![CDATA[$stock_status = $product_info['stock_status'];
    $stock_qty = $product_info['quantity'];
    
    $this->data['products'][] = array(
    'stock_status' => $stock_status,
    'stock_qty' => $stock_qty,]]></add>
    </operation>
    </file>
    
    <file name="catalog/controller/product/compare.php">
    <operation>
    <search position="after" offset="6" error="skip"><![CDATA[if ($product_info['quantity'] <= 0) {]]></search>
    <add><![CDATA[$stock_status = $product_info['stock_status'];
    $stock_qty = $product_info['quantity'];]]></add>
    </operation>
    <operation>
    <search position="replace" error="skip"><![CDATA[$this->data['products'][$product_id] = array(]]></search>
    <add><![CDATA[$this->data['products'][$product_id] = array(
    'stock_status' => $stock_status,
    'stock_qty' => $stock_qty,]]></add>
    </operation>
    </file>
    
    <file path="catalog/view/theme/*/template/product/" name="category.tpl,compare.tpl,manufacturer_info.tpl,search.tpl,special.tpl">
    <operation>
    <search position="replace" error="skip"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />]]></search>
    <add><![CDATA[<?php
    if ($product['stock_qty'] <= 0) {
    echo "<span style="color: red; font-size: 16px;"><span class="outofstock">" . $product['stock_status'] . "</span></span>";
    } else {
    echo "<input type="button" value="" . $button_cart . "" onclick="addToCart('" . $product['product_id'] . "');" class="button" />";
    }
    ?>
    ]]></add>
    </operation>
    </file>
    
    <file path="catalog/view/theme/*/template/module/" name="bestseller.tpl,featured.tpl,latest.tpl,special.tpl">
    <operation>
    <search position="replace" error="skip"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />]]></search>
    <add><![CDATA[<?php
    if ($product['stock_qty'] <= 0) {
    echo "<span style="color: red; font-size: 16px;"><span class="outofstock">" . $product['stock_status'] . "</span></span>";
    } else {
    echo "<input type="button" value="" . $button_cart . "" onclick="addToCart('" . $product['product_id'] . "');" class="button" />";
    }
    ?>
    ]]></add>
    </operation>
    </file>
    
    <file name="catalog/view/theme/*/template/account/wishlist.tpl">
    <operation>
    <search position="replace" error="skip"><![CDATA[<img src="catalog/view/theme/default/image/cart-add.png" alt="<?php echo $button_cart; ?>" title="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" />]]></search>
    <add><![CDATA[<?php
    if ($product['stock_qty'] <= 0) {
    echo "<span style="color: red; font-size: 10px;"><span class="outofstock">" . $product['stock_status'] . "</span></span>";
    } else {
    echo "<img src="catalog/view/theme/default/image/cart-add.png" alt="" . $button_cart . "" title="" . $button_cart . "" onclick="addToCart('" . $product['product_id'] . "');" />";
    }
    ?>
    ]]></add>
    </operation>
    </file>
    
    </modification>
    bu kodları ekledikten sonra vqmod/xml/ yoluna remove-add-to-cart-if-out-of-stock.xml dosyası geliyor ve ürün sayfasında şu şekilde bir hata veriyor:

    Notice: Indirect modification of overloaded property ControllerProductProduct::$data has no effect in /home/u8370508/otgtoptan.com/vqmod/vqcache/vq2-system_storage_modification_catalog_controller_product_product.php on line 286Notice: Indirect modification of overloaded property ControllerProductProduct::$data has no effect in /home/u8370508/otgtoptan.com/vqmod/vqcache/vq2-system_storage_modification_catalog_controller_product_product.php on line 287
    268. ve 287. satırda hata veren kodlar şu şekilde:

     $this->load->model('catalog/review');
    $data['tab_description'] = $this->language->get('tab_description');
    $data['tab_attribute'] = $this->language->get('tab_attribute');
    $data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);
    $data['product_id'] = (int)$this->request->get['product_id'];
    $data['manufacturer'] = $product_info['manufacturer'];
    $data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);
    $data['model'] = $product_info['model'];
    $data['mpn'] = $product_info['mpn'];
    $data['sku'] = $product_info['sku'];
    $data['seller'] = $this->config->get('config_name');
    $data['availability'] = $product_info['quantity'] > 0 ? 'InStock' : 'OutOfStock';
    $data['reward'] = $product_info['reward'];
    $data['points'] = $product_info['points'];
    $data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');
    
    if ($product_info['quantity'] <= 0) {
    $data['stock'] = $product_info['stock_status'];
    } elseif ($this->config->get('config_stock_display')) {
    $data['stock'] = $product_info['quantity'];
    } else {
    $data['stock'] = $this->language->get('text_instock');
    }
    (286. Satır) : $this->data['stock_status'] = $product_info['stock_status'];
    (287. Satır) : $this->data['stock_qty'] = $product_info['quantity'];
    Lütfen Yardım edin.



  • 27-04-2019, 15:29:26
    #2
    foinfinity adlı üyeden alıntı: mesajı görüntüle
    OC v2.1.0.1
    website: otgtoptan.com
    Merhabalar, vqmod ile bir xml dosyasını websiteme ekledim. Amacım stokta olmayan ürünler için sepete ekle butonunu kaybetmekti. ancak bir hata ile karşılaştım ve sepete ekleme butonu bütün ürünlerde kayboldu.


    vqmod ile eklediğim xml kodları şu şekilde:

    <modification>
    <id><![CDATA[@tik Remove Add to Cart button for Out of Stock items]]></id>
    <version><![CDATA[1.4.1]]></version>
    <vqmver><![CDATA[2.4.1]]></vqmver>
    <author><![CDATA[OC2PS]]></author>
    
    <file name="catalog/view/theme/*/template/product/product.tpl">
    <operation>
    <search position="replace"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />]]></search>
    <add><![CDATA[<?php if ($stock_qty <= 0) {
    echo "<span style="color: red; font-size: 16px;"><span class="outofstock">" . $stock_status . "</span></span>";
    } else {
    echo "<input type="button" value="" . $button_cart . "" id="button-cart" class="button" />";
    } ?>]]></add>
    </operation>
    <operation>
    <search position="replace"><![CDATA[<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a>]]></search>
    <add><![CDATA[<?php if ($stock_qty <= 0) {
    echo "<span style="color: red; font-size: 16px;"><span class="outofstock">" . $stock_status . "</span></span>";
    } else {
    echo "<a onclick="addToCart('" . $product['product_id'] . "');" class="button">" . $button_cart . "</a>";
    } ?>]]></add>
    </operation>
    </file>
    
    <file name="catalog/controller/product/product.php">
    <operation>
    <search position="after" offset="6"><![CDATA[if ($product_info['quantity'] <= 0) {]]></search>
    <add><![CDATA[$this->data['stock_status'] = $product_info['stock_status'];
    $this->data['stock_qty'] = $product_info['quantity'];]]></add>
    </operation>
    </file>
    
    <file path="catalog/controller/product/" name="category.php,manufacturer.php,search.php,special.php">
    <operation>
    <search position="replace" error="skip"><![CDATA[$this->data['products'][] = array(]]></search>
    <add><![CDATA[$stock_status = $result['stock_status'];
    $stock_qty = $result['quantity'];
    
    $this->data['products'][] = array(
    'stock_status' => $stock_status,
    'stock_qty' => $stock_qty,
    ]]></add>
    </operation>
    </file>
    
    <file path="catalog/controller/module/" name="bestseller.php,featured.php,latest.php,special.php,wishlist.php">
    <operation>
    <search position="replace" error="skip"><![CDATA[$this->data['products'][] = array(]]></search>
    <add><![CDATA[$stock_status = $product_info['stock_status'];
    $stock_qty = $product_info['quantity'];
    
    $this->data['products'][] = array(
    'stock_status' => $stock_status,
    'stock_qty' => $stock_qty,]]></add>
    </operation>
    </file>
    
    <file path="catalog/controller/account/" name="wishlist.php">
    <operation>
    <search position="replace" error="skip"><![CDATA[$this->data['products'][] = array(]]></search>
    <add><![CDATA[$stock_status = $product_info['stock_status'];
    $stock_qty = $product_info['quantity'];
    
    $this->data['products'][] = array(
    'stock_status' => $stock_status,
    'stock_qty' => $stock_qty,]]></add>
    </operation>
    </file>
    
    <file name="catalog/controller/product/compare.php">
    <operation>
    <search position="after" offset="6" error="skip"><![CDATA[if ($product_info['quantity'] <= 0) {]]></search>
    <add><![CDATA[$stock_status = $product_info['stock_status'];
    $stock_qty = $product_info['quantity'];]]></add>
    </operation>
    <operation>
    <search position="replace" error="skip"><![CDATA[$this->data['products'][$product_id] = array(]]></search>
    <add><![CDATA[$this->data['products'][$product_id] = array(
    'stock_status' => $stock_status,
    'stock_qty' => $stock_qty,]]></add>
    </operation>
    </file>
    
    <file path="catalog/view/theme/*/template/product/" name="category.tpl,compare.tpl,manufacturer_info.tpl,search.tpl,special.tpl">
    <operation>
    <search position="replace" error="skip"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />]]></search>
    <add><![CDATA[<?php
    if ($product['stock_qty'] <= 0) {
    echo "<span style="color: red; font-size: 16px;"><span class="outofstock">" . $product['stock_status'] . "</span></span>";
    } else {
    echo "<input type="button" value="" . $button_cart . "" onclick="addToCart('" . $product['product_id'] . "');" class="button" />";
    }
    ?>
    ]]></add>
    </operation>
    </file>
    
    <file path="catalog/view/theme/*/template/module/" name="bestseller.tpl,featured.tpl,latest.tpl,special.tpl">
    <operation>
    <search position="replace" error="skip"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />]]></search>
    <add><![CDATA[<?php
    if ($product['stock_qty'] <= 0) {
    echo "<span style="color: red; font-size: 16px;"><span class="outofstock">" . $product['stock_status'] . "</span></span>";
    } else {
    echo "<input type="button" value="" . $button_cart . "" onclick="addToCart('" . $product['product_id'] . "');" class="button" />";
    }
    ?>
    ]]></add>
    </operation>
    </file>
    
    <file name="catalog/view/theme/*/template/account/wishlist.tpl">
    <operation>
    <search position="replace" error="skip"><![CDATA[<img src="catalog/view/theme/default/image/cart-add.png" alt="<?php echo $button_cart; ?>" title="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" />]]></search>
    <add><![CDATA[<?php
    if ($product['stock_qty'] <= 0) {
    echo "<span style="color: red; font-size: 10px;"><span class="outofstock">" . $product['stock_status'] . "</span></span>";
    } else {
    echo "<img src="catalog/view/theme/default/image/cart-add.png" alt="" . $button_cart . "" title="" . $button_cart . "" onclick="addToCart('" . $product['product_id'] . "');" />";
    }
    ?>
    ]]></add>
    </operation>
    </file>
    
    </modification>
    bu kodları ekledikten sonra vqmod/xml/ yoluna remove-add-to-cart-if-out-of-stock.xml dosyası geliyor ve ürün sayfasında şu şekilde bir hata veriyor:

    Notice: Indirect modification of overloaded property ControllerProductProduct::$data has no effect in /home/u8370508/otgtoptan.com/vqmod/vqcache/vq2-system_storage_modification_catalog_controller_product_product.php on line 286Notice: Indirect modification of overloaded property ControllerProductProduct::$data has no effect in /home/u8370508/otgtoptan.com/vqmod/vqcache/vq2-system_storage_modification_catalog_controller_product_product.php on line 287
    268. ve 287. satırda hata veren kodlar şu şekilde:

     $this->load->model('catalog/review');
    $data['tab_description'] = $this->language->get('tab_description');
    $data['tab_attribute'] = $this->language->get('tab_attribute');
    $data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);
    $data['product_id'] = (int)$this->request->get['product_id'];
    $data['manufacturer'] = $product_info['manufacturer'];
    $data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);
    $data['model'] = $product_info['model'];
    $data['mpn'] = $product_info['mpn'];
    $data['sku'] = $product_info['sku'];
    $data['seller'] = $this->config->get('config_name');
    $data['availability'] = $product_info['quantity'] > 0 ? 'InStock' : 'OutOfStock';
    $data['reward'] = $product_info['reward'];
    $data['points'] = $product_info['points'];
    $data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');
    
    if ($product_info['quantity'] <= 0) {
    $data['stock'] = $product_info['stock_status'];
    } elseif ($this->config->get('config_stock_display')) {
    $data['stock'] = $product_info['quantity'];
    } else {
    $data['stock'] = $this->language->get('text_instock');
    }
    (286. Satır) : $this->data['stock_status'] = $product_info['stock_status'];
    (287. Satır) : $this->data['stock_qty'] = $product_info['quantity'];
    Lütfen Yardım edin.



    yüklediğiniz sadece vqmod xml dosyasımı yoksa ocmod mu
  • 27-04-2019, 15:37:15
    #3
    bu modülün ayrıca tpl ve php dosyalarıda vardır. onlarıda yüklemelisin. Ayrıca fastor tema Default sayfların yanısıra kendi ürün ve kategori saylararını kullanır. bu modülü buna göre modifiye etmelisin.
  • 27-04-2019, 15:42:01
    #4
    sadece xml dosyası vardı onu yükledim. Biraz araştırdım modül varsayılan tema içinmiş ben fastor teması kullanıyorum, nasıl entegre edebilirim.
  • 27-04-2019, 15:43:47
    #5
    dosyalar eksik sitede ayrıca ssl sıkıntısı yaşanıyor https protokolde siteniz baska bir ip ye yönleniyor

    css dosyalarınızda font linklerinizin başında bulunan http ve ya https adreslerini kaldırın örn:
    <link href="https://fonts.googleapis.com/css?family=Gugi" rel="stylesheet">

    olması gereken
    <link href="//fonts.googleapis.com/css?family=Gugi" rel="stylesheet">

    bu şekilde denerseniz siteniz biraz daha seri açılacaktır.
  • 27-04-2019, 15:52:48
    #6
    pm gönderildi..
  • 27-04-2019, 16:02:24
    #7
    axakallevent adlı üyeden alıntı: mesajı görüntüle
    dosyalar eksik sitede ayrıca ssl sıkıntısı yaşanıyor https protokolde siteniz baska bir ip ye yönleniyor

    css dosyalarınızda font linklerinizin başında bulunan http ve ya https adreslerini kaldırın örn:
    <link href="https://fonts.googleapis.com/css?family=Gugi" rel="stylesheet">

    olması gereken
    <link href="//fonts.googleapis.com/css?family=Gugi" rel="stylesheet">

    bu şekilde denerseniz siteniz biraz daha seri açılacaktır.
    Öneriniz için teşekkürler uygulayacağım hemen
  • 27-04-2019, 16:04:07
    #8
    problem devam ederse diye pm gönderiyorum
  • 27-04-2019, 16:04:54
    #9
    Kaya791 adlı üyeden alıntı: mesajı görüntüle
    bu modülün ayrıca tpl ve php dosyalarıda vardır. onlarıda yüklemelisin. Ayrıca fastor tema Default sayfların yanısıra kendi ürün ve kategori saylararını kullanır. bu modülü buna göre modifiye etmelisin.
    Yorumunuz için teşekkürler, modül klasöründe sadece xml dosyası vardı. Ben şu an yaptığım işlemi geri almak istesem yani modülü tamamen silmek istersem ne yapmam gerekir.