News:

AbanteCart v1.4.2.1 is released.

Main Menu
support

Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - maulik 1intl

#1
Quote from: Sam_78 on August 09, 2019, 12:03:18 PM
You will need to edit core code to get this. Better option is to make an extension

But try this if it works for you because I think you have some custom code already:

https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/pages/product/product.php#L750

if(isset($category_info) && count($category_info) > 0){
         $nextPrevProducts =  $this->model_catalog_product->getProductNextPrevProducts($product_id, $category_info['category_id']);
         $this->data['nextPrevProducts'] = $nextPrevProducts;
      }

right above foreach ($results as $result) {

-----
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/model/catalog/product.php

Add this before last } line

public function getProductNextPrevProducts($productId, $categoryId){
      $sql = "SELECT * FROM " . $this->db->table("products_to_categories") . " WHERE `category_id` = $categoryId and product_id in ( select product_id from " . $this->db->table("products") . " where STATUS = 1)";
      $query = $this->db->query($sql);
      $product_data =  $query->rows;
      $nextPrevProduct = array();
      if(count($product_data) > 0){
         foreach($product_data as $k => $v){
            if($v['product_id'] == $productId){
               $preProductId = isset($product_data[$k - 1]['product_id']) ? $product_data[$k - 1]['product_id'] : 0;
               $nextProductId = isset($product_data[$k + 1]['product_id']) ? $product_data[$k + 1]['product_id'] : 0;
               $cateSql = "SELECT keyword FROM `url_aliases` WHERE `query` LIKE 'category_id=$categoryId'";
               $cateSqlQuery = $this->db->query($cateSql);
               $cateURL =  count($cateSqlQuery->rows) > 0 ? $cateSqlQuery->row['keyword']: '';
               
               $prevProductSql = "SELECT keyword FROM `url_aliases` WHERE `query` LIKE 'product_id=$preProductId'";
               $prevProductSqlQuery = $this->db->query($prevProductSql);
                 $prevProductURL =  count($prevProductSqlQuery->rows) > 0 ? $prevProductSqlQuery->row['keyword']: '';
               
               $nextProductSql = "SELECT keyword FROM `url_aliases` WHERE `query` LIKE 'product_id=$nextProductId'";
               $nextProductSqlQuery = $this->db->query($nextProductSql);
               $nextProductURL =  count($nextProductSqlQuery->rows) > 0 ? $nextProductSqlQuery->row['keyword']: '';
               
               $nextPrevProduct['prev_product'] = (trim($prevProductURL) != '') ? $cateURL . "/" . $prevProductURL : '';
               $nextPrevProduct['next_product'] = (trim($nextProductURL) != '') ? $cateURL . "/" . $nextProductURL : '';
            }
         }
      }
      return $nextPrevProduct;
   }

And last go to product.tpl and add this code where ever you want buttons and style it the way you want.

https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/pages/product/product.tpl#L268

<?php if(is_array($nextPrevProducts)){ ?>   
<div>
   <div style="float: left">
      <?php if(trim($nextPrevProducts['prev_product']) != '') {?>
         <a href="<?php echo trim($nextPrevProducts['prev_product']); ?>" > Previous Product </a>
      <?php } ?>
   </div>
   <div style="float: right">
      <?php if(trim($nextPrevProducts['next_product']) != '') {?>
         <a href="<?php echo trim($nextPrevProducts['next_product']); ?>" > Next Product </a>
      <?php } ?>
   </div>
</div>
<?php } ?>

You can contact AbanteCart developers (they have paid service abantecart.com/contact-us) or some other developers https://www.fiverr.com/nattoben This developer has made few extension for AbanteCart he might be able to help you https://marketplace.abantecart.com/index.php?rt=product/vendor&v=40 

P.S I am not promoting anyone here just trying to help you as what you want is not an easy thing. It needs some custom development
#2
Thanks  :) :) :) :) :) :)

for replay i was find solution.
#3
General Support / How to add catalog in special product
December 04, 2019, 12:22:53 AM
      Hi

             Nice to use. :) :) :) :) :)
             i don't need add products but add catalog in special page.Not single products.
             There is any way to add catalog in special?


      Thanks
#4
General Support / How to change special offer layout
November 30, 2019, 02:31:50 AM
Hello Sir

                 Nice to use abantecart
                 how to edit html block in special products page and change lay out of view in special product page.



Thanks
#5
General Support / Re: Upload new products and image
November 22, 2019, 08:19:55 AM
Thanks for replay  :)

yes but it's all product page is same call and same error in other products page but no issue is there i was see.
And also all products page is same kind of everything .why only new products page image so like that?not old products image are change?
#6
General Support / Upload new products and image
November 22, 2019, 07:46:11 AM
Hello

                 Nice to use abantecart
                 i was just upload new product as before i was upload but today i just upload new products but image size not work as i was set how i don't get where it's change?

New products upload image
http://1intl.com/10375--s-12/10375-02

Old products work fine
http://1intl.com/10365--s-56/10365-01

Also attach new and old product image
New product
Old   product
#7
Quote from: HADY on August 30, 2019, 05:04:20 AM
nice introduction background video, congratulations.
I was complete product page next preview button update in website replay not video bro    :P :P :P :P
#8
General Support / Re: Seo url not work in product page
August 30, 2019, 04:52:54 AM
thanks for all replay i was do it
#9
Quote from: Sam_78 on August 21, 2019, 09:48:07 AM
Quote from: maulik 1intl on August 21, 2019, 05:06:32 AM
Thanks bro Sam_78 your awesome great your great's in this filed bro.
Thanks you very much bro  :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)
He is nice and great skill in this filed.
Thanks Sam_78  very much

Hi I am happy it worked for you. Send me your URL once you are done with implementing this


Thanks  :) :) :) sam_78  :) :) :) :) :) i was done in my website next preview button completed today i get error in some my product delete and change it so some time it's redirect me to other page and i was fixed today of all my products.Thanks Sam_78 so much  :) :) :)  my website link as below

http://1intl.com
#10
Quote from: Sam_78 on August 21, 2019, 09:48:07 AM
Quote from: maulik 1intl on August 21, 2019, 05:06:32 AM
Thanks bro Sam_78 your awesome great your great's in this filed bro.
Thanks you very much bro  :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)
He is nice and great skill in this filed.
Thanks Sam_78  very much

Hi I am happy it worked for you. Send me your URL once you are done with implementing this



Thanks
Currently only my few product is work because of SEO URL when i was import products it's not generate SEO Name so And also my SEO url work.Here is url

http://1intl.com/10367--s-28/10367-01
http://1intl.com/10359-s-30/10359-02

Also i will do change seo link of product. So next my all website work properly.

Thanks & Regards
#11
General Support / Re: Seo url not work in product page
August 21, 2019, 05:49:16 AM
but i was upload new product using import file than why it's not generate auto seo name for it.??? there is anything setting to change for create it???????????????????
#12
Thanks bro Sam_78 your awesome great your great's in this filed bro.
Thanks you very much bro  :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)
He is nice and great skill in this filed.
Thanks Sam_78  very much
#13
General Support / Seo url not work in product page
August 21, 2019, 03:11:43 AM
Hello
             Nice to use abantecart  :) :) :) :) :). Thanks for help

                       there is any way to generate all product seo name like import product to generate.


Thanks & Regards   :)
#14

Thanks  :) :) :)

i am also try to display id with this
<?php  echo "<pre>"; print_r($nextPrevProducts['prev_product']);exit;?>
but no data was display??????
#15
Quote from: HADY on August 20, 2019, 08:03:53 AM
hi!

Did you fixed that ??

Thanks
No sir i can't fix it.there is no date was found.in query

Forum Rules Code of conduct
AbanteCart.com 2010 -